Are you looking for car insurance to suit your budget, with benefits like free roadside assistance and rewards even if you claimed? MiWay offers flexible and affordable motor insurance, we even allow you to fix your premiums for a period of 36 months!*
MiWay will reward you if you prefer doing things online! By simply applying for and taking out your car insurance policy online, MiWay will pay you an average full month's premium after 3 months full premiums are received.*
*Terms & conditions apply
Why choose MiWay's standard Car Insurance?
- Affordable premiums, low flat excess
- Apply and buy your car insurance online to earn extra rewards
- Great Service, hassle free claims process
- Earn rewards whether you claim or not
- Free Roadside emergency assistance
- Earn rewards and save on joining fees by buying your car insurance online
- Fix your premiums for a period of 36 months!*
*Terms & conditions apply
Types of Car Insurance
MiWay offers three types of car insurance Comprehensive, Third Party Fire and Theft, and Third Party only.
Comprehensive car insurance provides the widest cover and covers for theft and hijacking, damages due to an accident, fire or explosion and natural disasters like hail and floods. Comprehensive cover also includes damage to the vehicles glass and liability to other parties as a result of an accident.
Third Party Fire and Theft insurance provides insurance cover for any damage you may cause to the vehicle of another person, and the accidental death or injuries of third parties involved in the same accident. You will also be compensated for the loss of your vehicle due to attempted theft, theft or hijacking, as well as any damage to your vehicle that was caused by fire, lightning or explosions.The main difference between 'Comprehensive' and 'Third Party Fire and Theft' is that your car is not covered against accidental damage.
Third Party Only insurance is the cheapest car insurance and provides insurance cover for any damage you may cause to the vehicle of another person as well as the accidental death or injuries of third parties involved in the same accident. You have no cover under this insurance type against the loss of, or damage to your own vehicle.
Car Insurance Options
In addition to accident or theft, comprehensive car insurance in South Africa covers losses due to fire and explosion, natural disasters like hail and floods and damage to the vehicles glass.
Additional options such as car hire and cover for non-standard sound systems and car accessories can also be added to your motor insurance policy.
MiWay can cover your car for either private, professional or business use:
Private or social purposes, including driving between your home and regular place of work will be classified as private use.
Professional use is where the car forms an essential part of the performance of any work or function as a Lawyer, Doctor, Actuary, Accountant, Architect or an Engineer and it also includes private use.
Business use is where the car forms an essential part of the performance of any work or function and it also includes private use.
Scenario: If you utilise your car for business purposes, your car is on the road more often than if you only use it for private purposes. The chance of it being stolen or involved in an accident is therefore much greater. The premium for a car being used for business purposes is higher compared to the same car being used only for private purposes. If you insure your car for the incorrect use you will not have cover on your car in the event of a claim as the premium paid will be incorrect.
Your vehicle can be insured for one of the following values:
- Retail value
- Market value (the average between the vehicles retail and trade values)
- Trade value
- Specially agreed value (which applies to unlisted, collectors and vintage vehicles where a valuation is given by an appropriate approved source)
Your policy coversheet reflects the value that you chose. The amount to this value will be determined at the time of loss taking into account the age, mileage and condition of the vehicle.
What process is involved in getting your vehicle insured?
The car insurance process starts with you, the car owner, completing an insurance quote from MiWay online or telephonically. Assuming you find the premium affordable, which we are sure you will, you agree to a start date for your new cover. MiWay will send you your documentation including a Coversheet (Policy schedule), which spells out the terms of your insurance policy and explains everything you need to know regarding your policy and car insurance in general. If necessary, MiWay will also help you to find an inspection centre which is convenient for you to visit. Your vehicle insurance cover will be fully activated once MiWay has received your premium. Please remember to comply with any requirements, i.e. have your car inspected, install additional security devices (like a tracking device, immobilizer etc), as this will influence whether you would enjoy insurance cover or not.
Get a SpeedQuote* and sign up online in minutes!
' + value + '
'; }); $.alert({ alertHtml:html, alertType: 'warn'}); } }.bind(this), error: function (request, status, error) { this.unload(); $.alert({ alertHtml:'Sorry, an unknown error has occured. Please try again.
', alertType:'warn'}); this.ajaxErrors += (error.toString() + '|||'); $('html, body').animate({ scrollTop: this.form.offset().top - 50 }, 200); }.bind(this) }); } else { this.validation = this.validate(); $('form#callbackForm1020 input, form#callbackForm1020 textarea').setDefaultValue(); } }, load: function () { this.formSubmitBtn.text('sending...').addClass('disabled').unbind('click'); $(this.loaderImg).insertAfter(this.formSubmitBtn); }, unload: function () { this.formSubmitBtn.text(this.defaultSubmitText).removeClass('disabled'); $('.loader').remove(); this.addSubmit(); }, addSubmit: function () { // attach submit this.formSubmitBtn.unbind('click').click(function (e) { if (this.debug) log(this.formSubmitBtn.text() + ' - click'); e.preventDefault(); this.submit(); }.bind(this)); }}); var btnHtml = ''; $('#callback1020 .plugin.vertical').append(btnHtml);{body}
', licenseSelect: '',selectEl:'',optionEl:'',button:'{text}'// address:''},initialize: function(options){var switches,loadScreenImage;this.opt = Object.extend({helpTimeout:300,formSubmitBtn:$('.form_submit'),product_id:'',app_id:0,miwy_np:0,cur_step:2, isMixpress: false,miwy_fa:'', form_type:'',getFormData:ProtoBits.emptyFunction,onInit:ProtoBits.emptyFunction, submitUrl: "/misc/xhr/form_actions.php", validationSelect: '.form.tab-container:visible form.validate', formValuesSelect: '#content'}, options || {});// if (this.opt.isMixpress == true) { loadScreenImage = '/images/generic-loader-pink-big.gif';// } else if (/*$('input[name="product_id"]').size() > 0 && */this.opt.product_id.length > 0){// loadScreenImage = '/images/' + this.opt.product_id.toLowerCase().strip() + '-loader.gif';// } this.loadScreen = new LoadScreen({ 'image':loadScreenImage, 'message':"Please wait...", 'disableClose':true, 'disableCloseTimeout':0, 'extraTopOffset': (-100), 'extraMessageTop': 120 }); this.loadScreen.show({image:false,color:"transparent",opacity:0,message:''});this.helpTimer = setTimeout(this.pageAssist.bind(this), (this.opt.helpTimeout*1000));this.getFormData = this.opt.getFormData.bind(this);this.oninit = this.opt.onInit.bind(this); this.validate();$('body').append(this.loader);this.loader = $("#ajax_loader");this.loader.remove(); shortSwitches = $('.form-column.full .yesno-switch:not(.switch-active)');longSwitches = $('.form-column:not(.full) .yesno-switch:not(.switch-active)'); sideSwitches = $('.form_top_right .yesno-switch:not(.switch-active), .insurance_quotes .yesno-switch:not(.switch-active)'); shortSwitches.parents('div.field-input').find('.question').addClass('yesno'); longSwitches.parents('div.field-input').find('.question').addClass('yesno');sideSwitches.parents('div.field-input').find('.question').addClass('yesno');setTimeout(function(){ longSwitches.createInputSwitch({ handleOnPosition:0, customClass:'long', checkedLabel:'YES', uncheckedLabel:'NO' }); setTimeout(function () { shortSwitches.createInputSwitch({ handleOnPosition:0, //customClass:'long', checkedLabel:'YES', uncheckedLabel:'NO', customClass: 'short' }); setTimeout(function () { sideSwitches.createInputSwitch({ handleOnPosition:0, customClass:'short', checkedLabel:'YES', uncheckedLabel:'NO' }); }, 50); }, 50);}, 50); $('div.field .yesno-radio').createYesNoInput();this.formValues = $(this.opt.formValuesSelect).serializeElement(); if ($('#form_help_bar').size() > 0) { this.sidebarStartTop = $('#form_help_bar').offset().top; }this.oninit(); setTimeout(function () { this.loadScreen.close(); $("input[name='fullnames'], input[name='surname'], input[name='fullnames_regulardriver'], input[name='surname_regulardriver'], input[name='preferredname'], input[name='preferredname_regulardriver']").on("keyup", function(){ try{ $(this).val($(this).val().split(" ").invoke("capitalize").join(" ")); }catch(e){} }); }.bind(this), 500); this.validate(); if (!Object.isUndefined(this.opt.isMixpress) && this.opt.isMixpress == true) { $('.prefer_story').hide().remove(); } $('input.number').each(function(){var el = $(this),validInputs=['insured_value','sum_insured','building_value','insured','jewellery_insurance'];if(validInputs.hasVal(el.attr('name'))){el.insert({'before':'R
'});}}); //temp fix for insured_value if($("input[name='insured_value']").val() != null){$("input[name='insured_value']").insert({'before':'R
'});} // make/model/year and brand new or used $AR('beforeSubmit', this.preSubmit, 0, this); $(document).ready(function () { window.lastYearVal = 0; if (typeof $FD('year') != 'undefined') { window.checkYearInterval = setInterval(function () { var yearVal = $FD('year').tiaValue; if (yearVal.length == 4 && yearVal != window.lastYearVal) { var el = $('select[name="brand_new__used__rebuild"]') || []; if (el.size() > 0) { if (parseInt(yearVal) Brand new'}); el.createSelect(); } } else { clearInterval(window.checkYearInterval); } } window.lastYearVal = yearVal; }, 1000); } }); var fields = $('.container').find('[name="make_model"],[name="property_address"],[name="building_address"],[name="night_time_suburb"],[name="day_time_suburb"]'); fields.on('mouseup', function (ev) { this.select(); });// if (!Object.isUndefined(globals.global_ssl_enabled) && parseInt(globals.global_ssl_enabled) == 1) {// var sUrl = this.opt.submitUrl;// if (!Object.isUndefined(sUrl) && sUrl != null && sUrl != '') {// var hname = document.location.hostname;// if (sUrl.substr(0,1) == '/') {// sUrl = 'https://'+hname+sUrl;// }// }// this.opt.submitUrl = sUrl;// delete sUrl;// }}, switchToForm: function(){ trackEvent('form preference', 'switch form', 'to form'); window.onbeforeunload = ProtoBits.emptyFunction; var ls = new LoadScreen({ 'image': '/images/generic-loader-pink-big.gif', 'message': '', 'disableClose':true, 'disableCloseTimeout':0, 'extraTopOffset': (-100), 'extraMessageTop': 120 }); ls.show('Please wait while we load a normal form for you...'); setTimeout(function () { $("#normal_form").submit(); }, 1000); }, switchToStory: function(){ trackEvent('form preference', 'switch form', 'to story'); window.onbeforeunload = ProtoBits.emptyFunction; var ls = new LoadScreen({ 'image': '/images/generic-loader-pink-big.gif', 'message': '', 'disableClose':true, 'disableCloseTimeout':0, 'extraTopOffset': (-100), 'extraMessageTop': 120 }); ls.show('Please wait while we load the story version...'); setTimeout(function () { $("#story_form").submit(); }, 1000); },setupSidebar:function(el, anchor){$('body').append(this.help_arrow);this.help_arrow = $('div.form_help_arrow');this.help_arrow.hide(); if ($('#form_help_bar').size() > 0 || $(el).size() > 0) { this.sideBar = Object.isUndefined(el) ? $('#form_help_bar') : $(el);if(this.sideBar !== null && this.sideBar.size() > 0){ this.innerSideBar = this.sideBar.find('div.plugin'); this.sideBarComplete = this.sideBar.find('div.percent_complete');this.sideBarTitle = this.sideBar.find('div#percent_complete h2'); this.scrollAnchor = Object.isUndefined(anchor) ? $("#tabs_container") : $(anchor); this.sidebarOffsetTop = this.sideBar.offset().top;this.sideBarTitle.hide(); this.help_arrow.css({'left':(this.sideBar.offset().left-30)+'px'}); this.sideBar.css("position", "relative"); this.scrolling = false;}// $(document)._on('mousewheel','',this.scrollSidebar.bind(this));// $(document).bind('scroll', this.scrollSidebar.bind(this)); }}, updateSidebar: function (id) { this.help_arrow = $('div.form_help_arrow'); if (typeof id == 'string' && typeof this.sidebarStartTop != 'undefined') { var el = $('#'+id), helpDiv = $('div.help_text');; if (el.size() > 0) {// log('updateSidebar');// log(el.parents('div.field').offset());// log(this.sidebarStartTop); var arrowTop = ((el.parents('div.field').offset().top)-40), fieldTop = el.parents('div.field').offset().top, newmargin,contentDiv = el.parents('.tab-container'),contentMax = (contentDiv.offset() != null ? contentDiv.offset().top : 0) + contentDiv.height(),newmargin = fieldTop - this.sidebarStartTop - 158;// 58 is to center the center of the arrow with the heading in the "compliance copy"// log(newmargin);// log(newmargin+this.sideBar.height()+this.sidebarStartTop+$('div#form_help_bar .form_top_right').height());// log(contentMax); //$('div.form_help_arrow').css({'top': arrowTop+'px'}).show('fade',200);(newmargin+this.sideBar.height()+this.sidebarStartTop+$('div#form_help_bar .form_top_right').height()) > contentMax ? newmargin = (contentMax -this.sidebarOffsetTop- this.sideBar.height()-$('div#form_help_bar .form_top_right').height()): 0;// log("margin-top:"+newmargin);this.sideBarTitle.show(); this.sideBar.animate({'margin-top':newmargin+'px'}, 250); this.help_arrow.show().animate({'top': (el.parents('div.field').offset().top-34)+'px'}, 250); if(typeof this.helpText != 'undefined' && this.helpText != "" && this.helpText != helpDiv.html()){ helpDiv.html(this.helpText); helpDiv.show('fade'); //helpDiv.fadeIn(); this.helpText = "" } } } if ($('#form_help_bar').size() > 0) { this.help_arrow.css({'left':($('#form_help_bar').offset().left-30)+'px'}); //log(this.help_arrow.css('left')); } },scrollSidebar: function(e){var top,padding,limit,wh,ih;top = ($(document).scrollTop()-this.sidebarOffsetTop)+10;padding = $('.form_top_right').cssUnit('padding')[0];Object.isUndefined(padding) ? padding = 0 : 0;limit = ((this.scrollAnchor.offset().top-this.sidebarOffsetTop)+this.scrollAnchor.realHeight())-this.sideBar.realHeight()/*+(padding*2)))-5*/;wh = ($(window).height()-20);ih = wh-(this.sideBarComplete.height()+this.innerSideBar.cssUnit('paddingTop')[0]+this.innerSideBar.cssUnit('paddingBottom')[0]+this.innerSideBar.cssUnit('marginTop')[0]+this.innerSideBar.cssUnit('marginBottom')[0]+90); this.scrolling = false;//if(top > -1){//if(top 0) {// Object.isFunction(this.setRowActive) ? this.setRowActive($(el)) : 0;// }if (!this.helpLocked) {var elId,field;el = $(el);elId = el.find('input,select').identify(); if (Object.isFunction(elId.gsub)) { elId = elId.gsub('_hiddeninput',''); }field = $FD(elId); if (Object.isFunction(e.stop)) e.stop();if(this.arrowTimer){clearTimeout(this.arrowTimer);this.arrowTimer = false;this.pageY = (el.offset().top);this.helpText = !Object.isUndefined(field) ? (field.long_help_txt || field.fieldDisplayName) : "";}if(!this.arrowTimer){this.arrowTimer = setTimeout(function(e){ this.updateSidebar(elId);this.arrowTimer = false}.bind(this), 250)}}},activateLicenseField: function() {this.licenses = $('.do_licenses');if (this.licenses.size() > 0) { var date = new Date(); var currentMonth = date.getMonth(); var currentDate = date.getDate(); var currentYear = date.getFullYear(); this.licenses.each(function () { var fieldId = $(this).identify(),fieldName=$(this).attr('name'),c,data,textValue;data = (typeof $FD(fieldName).tiaValue == 'object' && !Object.isUndefined($FD(fieldName).tiaValue.array) ? $FD(fieldName).tiaValue.array : $FD(fieldName).tiaValue)|| [];c = data.size();if(c > 0){textValue = c+(c == 1 ? ' licence' : ' licences');FieldData.setFieldVal(fieldName, data, textValue);$('#'+fieldId).text(textValue);} $(this).customField({ columns: { licenseType: { title:"Licence Type", className:'name', type:'content', content:'' }, licenseDate: { title:"Issue Date", className:'data', type:'input', inputClass:'date required' } }, onvalidate : function(value){ for (var i = 0; i 0) { var currentMil = parseInt(new Date().getFullYear().toString().slice(0,2)); var currentYear = parseInt(new Date().getFullYear().toString().slice(2,4)); y = parseInt(idnum.slice(0,2)); if (y > currentYear && y.toString() != '0') { y = parseInt(((currentMil - 1).toString() + y.toString())); } else { y = parseInt(((currentMil).toString() + y.toString())); } m=parseInt(idnum.slice(2,4))-1; d=parseInt(idnum.slice(4,6)); dob = new Date(y,m,d); eighteen = parseInt(dob.getFullYear()) + 18; var currentFullYear = parseInt(currentMil.toString() + currentYear.toString()); var diff = (new Date().getFullYear()) - eighteen; } else { var diff = 30; } function checkDisabledMonths(y, ui) { //log(eighteen); //log(ui); setTimeout(function () { $('[data-month]').find('a').removeClass('ui-state-disabled'); var d = new Date()/*, months = {'January':0, 'February':1, 'March':2, 'April':3, 'May':4, 'June':5, 'July':6, 'August':7, 'September':8, 'October':9, 'November':10, 'December':11}*/; if (ui.selectedYear == eighteen) { d.setFullYear(eighteen); d.setMonth((parseInt(idnum.slice(2,4)))-1); //log(d.getMonth()); for (i = 0;i 0) { var d = new Date(); d.setFullYear(eighteen); sett.defaultDate = d; } //} date.monthpicker(sett); $('.ui-monthpicker-trigger').remove(); date.attr('readonly','readonly'); $('#licenseType').createSelect(); }, showEvent: ['click','focus'],// hideEvent: 'blur', tooltipTitle: $FD('licenses').help_txt, fieldName: $FD('licenses').fieldName, onsave: function(data) { var c = data.size(),textValue; textValue = c+(c == 1 ? ' licence' : ' licences');// console.log(data); FieldData.setFieldVal(fieldName, data, textValue); $('#'+fieldId).text(textValue); if ($('#'+fieldId+'_hiddeninput').size() > 0) { $('#'+fieldId+'_hiddeninput').val(textValue).blur().valid(); } }, saveText: 'Save Licences', data: data }); });}},createVehicleAutocomplete: function(el){var type = this.opt.product_id;this.vs = $(el).autoComplete({ showAlternateCar: true, keywordType: this.opt.product_id,dataUrl:"/misc/xhr/vehicle_search.php",addFilter: function(obj){var data = {};data[obj.makeModelCode] = obj;return data;},keywordFilter: function(keyword){keyword.match('vw') ? keyword = keyword.gsub("vw", 'volkswagen') : 0return keyword;},dataFilter: function(o){ //if (!Object.isUndefined(o[0]) && o[0] != 'null') { if (Object.isString(o[1].name)) { var matchString = (o[1].name.toLowerCase()).match(this.keyword) != null ? (o[1].name.toLowerCase()).match(this.keyword) : (o[1].tags.toLowerCase()).match(this.keyword); if(matchString == null){ var arrSearchTerm = this.keyword.split(' '); for (var i = 0; i '+years+''; } d[o[0]] = vname; return d; } } //}},clickResult:function(e, el){el = $(el);if(el.identify() != "no_select"){var code,data,name;name = this.getText(el);code = el.identify(); switch(code) { case 'carcantfind': // Can't find your car? //log('-11 !'); $(this.el).removeClass('error').parents('.error').removeClass('error'); $(this.el).parents('div.field').find('.message').text(''); this.carTooltip = $(this.el).customCarField({ onsave: function (data, id) { var code = $('#model :selected').val(); var textValue = $('select[name="custom"]#make :selected').val() + ' ' + $('select[name="custom"]#name :selected').val() + ' ' + $('select[name="custom"]#model :selected').text();var year =$('#carYear :selected').text(); $('#'+id).val(year + ' ' + textValue);// this.hiddenInput.val(code);// this.hiddenYearInput.val(year); FieldData.setFieldVal('make_model', code, textValue); FieldData.setFieldVal('year', year, year); try { $('#'+id).valid();$('#'+id).blur(); } catch (err) { } } }, type); this.carTooltip.showTooltip(); this.removeContainer(); setTimeout(function () { var make = $('select[name="custom"]#make'); var name = $('select[name="custom"]#name'); var year = $('select[name="custom"]#carYear'); var model = $('select[name="custom"]#model'); make.unbind('change').createSelect({colMax: 1, optionsClass: 'custom-car', colWidth: 200, colMinWidth: 200}); name.createSelect({colMax: 1, optionsClass: 'custom-car', colWidth: 200, colMinWidth: 200}).attr('disabled', true); year.createSelect({colMax: 1, optionsClass: 'custom-car', colWidth: 200, colMinWidth: 200}).attr('disabled', true); model.createSelect({colMax: 1, optionsClass: 'custom-car', colWidth: 200, colMinWidth: 200}).attr('disabled', true); this.blueLoader = '
' + msg + '
', alertType: 'warn' });// }// }// }// }// } if ($(this.opt.validationSelect).valid() && valid == true) { //log('extra validation section'); var forms = $(this.opt.validationSelect.replace(':visible', '')); forms.valid(); if (parseInt(forms.find('.error').size()) > 0) { var firstError = forms.find('.error').first(); $('a.step_'+firstError.parents('.form.tab-container').identify().replace('tabs-', '')).first().click(); setTimeout(function () { $(this.opt.validationSelect).valid(); firstError = $(this.opt.validationSelect).find('.error').first(); $('html, body').animate({scrollTop: firstError.offset().top - 100}, 250); }.bind(this), 500); } }if ($(this.opt.validationSelect).valid() && valid == true) { //log('valid submit');window.onbeforeunload = ProtoBits.emptyFunction;// if(!this.opt.app_id && !this.opt.isMixpress){// this.load("We are busy gathering data to calculate your premium. Please wait ...");// } else {this.load();// } var valid = false;// if (Object.isUndefined(this.opt.isMixpress) || this.opt.isMixpress == false && (isNaN(this.opt.app_id) || parseInt(this.opt.app_id) 0 || this.opt.isMixpress) { t = 2000; } var doValidate = 0; if ( ( Object.isUndefined(this.opt.isMixpress) || this.opt.isMixpress == false ) && (isNaN(this.opt.app_id) || parseInt(this.opt.app_id) Profile updated!'; html += 'Thank you for updating your details.
'; if (!Object.isUndefined(retData.oldpremium) && !Object.isUndefined(retData.premium)) { if (retData.premium != retData.oldpremium) { html += 'Your old premium: R ' + retData.oldpremium;// + '
'; html += 'Your new premium: R ' + retData.premium + ''; html += '
Please contact the call center if you have any questions.
' + (globals.form_indicative_failed || 'Unfortunately an error occurred while retrieving your insurance information from TransUnion, we apologise for the inconvenience. Please click continue to load our user friendly form in order to complete your quote') + '
',alertType:"info",alertButtons:{ 'Continue': function(){$AC('nextPage');},'Close': function(){ $('input[name="noValidate"]').val(0);return false;} }});} else { if (this.opt.app_id > 0) { // tracking trackPageview('/gagoal/add-quote-success/'+(pId || 'E')); } setTimeout(function () { $AC('nextPage'); }, 1000);} } } else { var html = 'Something may have gone slightly wrong while your last request was being processed. ' + 'Please quote the message below when contacting our call center. ' + ''; if (typeof retData.debug != 'undefined' && retData.debug != null) { html += retData.debug + '
'; } if (typeof retData.errors == 'object' && !isNaN(retData.errors.length) && retData.errors.length > 0) { retData.errors.each(function(error) { html += error + '
'; }); } if (typeof retData.errors == 'string' && retData.errors != '') { html += retData.errors + '
'; } html += ''; $.alert({alertHtml:html, alertType:"error"}); } }.bind(this), error: function(request, status, error) { this.unload(); $('
Sorry, an error ('+error+') has occured. Please try again.
').insertAfter(this.opt.formSubmitBtn); $.alert({alertHtml:"There was an error while trying to complete your request. Please quote the message below when calling the call center about this error.
Sorry, an unknown error has occured. Please try again or call the call center.", alertType:"error"});//("+request.status + '|' + request.statusText+") }.bind(this) }); }.bind(this), t); },checkProgress: function(){ if (Object.isFunction(this.completed.calculate)) { var percentage = this.completed.calculate(); //if(percentage >= 100){ //this.opt.formSubmitBtn.removeClass('disabled'); //this.bindSubmit(); //} }},bindSubmit: function(){// log('bindSubmit');// log(this.opt.formSubmitBtn);// log(this.opt.formSubmitBtn.parents('.form.tab-container'));this.opt.formSubmitBtn.unbind('click').click(this.submit.bind(this));}, load: function() { this.opt.loading = true; $(this.opt.validationSelect + ' input.auto_alt_toggle').clearDefaultValue();var msg = globals['loading_step'+this.opt.cur_step+'_loading_message'];Object.isUndefined(msg) ? msg = "Please wait..." : 0;// if (parseInt(this.opt.app_id) > 0 || this.opt.isMixpress) {// if (parseInt(this.opt.app_id) > 0 || this.opt.isMixpress) { //log('hi'); this.loadScreen.show(msg, globals['loading_step'+this.opt.cur_step+'_loading_block']);//'
'+msg+'
We promise that your premium will not change during a 12 month cycle - even if you have to claim!
Your cover starts from day 1!
We finalise car insurance claims in 4.5 days on average.
Chat to us right now by clicking the live chat button below or keep helping yourself.').gsub('{title}', 'Need some help?'),// alertType:'help',// alertButtons:{// 'Live Chat': function () {// $('#LP_DIV_1350916334825').find('a').click();// this.close();// },// 'No Thanks':function () { //this.close();// }// }// });// if(typeof lpMTagStatic === 'undefined'){// $("head").append(new Element("script", {'type':"text/javascript",'charset':"UTF-8",'src':"https://server.iad.liveperson.net/hc/86496974/?cmd=mTagRepstate&site=86496974&buttonID=7&divID=LP_DIV_1350916334825&bt=3&c=1"}));// }// } else { $.alert({ alertId: 'fieldAssist', alertHtml:this.TEMPLATES.assist.gsub('{body}', '
Request a callback and we\'ll call you right back! ... or keep helping yourself.').gsub('{title}', 'Need some help?'), alertType:'help', alertButtons:{ 'Call me back': function () { $('body').append(''); applyCallmeback(); $('a.call-me-back').first().click(); this.close(); }, 'No Thanks':function () { //this.close(); } } });// }},pageAssist: function(){//$.alert({// alertId: 'pageAssist',//alertHtml:this.TEMPLATES.assist.gsub('{body}', 'page idle assistance popup').gsub('{title}', 'Do you need some assistance?'),//alertType:'help',//alertButtons:{//'Yes': function () { //this.close();//},//'No':function () { //this.close();//}// }//});},preventPageLeave: function(e){//log(e);e.preventDefault();return false;}});////function yesnoChanged (id, newValue) {// if (!Object.isUndefined(id)) {// id = parseInt(id.gsub('field_',''));// $FD(id).tiaValue = newValue;// }//}jClass.create('customCarField', { initialize: function(options, vehicle_type){vType = vehicle_type == "BIKE" ? "Bike" : "Car"; this.opt = Object.extend({ columns: {}, rows:{ make: { label: 'Make', className: 'make', type: 'content', inputClass: 'car_make', content: ''// }, name : { label: 'Model', className: 'model_group', type: 'content', inputClass: 'car_model_group', content: ''// }, year : { label: 'Year', className: 'year', type: 'content', inputClass: 'car_year', content: ''// }, model: { label: vType, className: 'model', type: 'content', inputClass: 'car_model', content: ''// } }, onshow:ProtoBits.emptyFunction, onadd:ProtoBits.emptyFunction, showEvent:false, hideEvent:false, tooltipTitle:'Start with the make of your '+vType.toLowerCase(), fieldName:'custom', saveText:'Save', cancelText:'Cancel', onsave:ProtoBits.emptyFunction, oncancel:ProtoBits.emptyFunction, data:[], disallowMultiple: false }, options || {}); this.onshowfunc = this.opt.onshow.bind(this); this.columnList = Object.keys(this.opt.columns); this.rowList = Object.keys(this.opt.rows); this.saveBtn = $(new Element('a', {'class':'blue_btn save', 'href':'javascript:void(0);','onclick':'return false;'})).click(this.saveData.bind(this)); this.cancelBtn = $(new Element('a', {'class':'blue_btn cancel', 'href':'javascript:void(0);','onclick':'return false;'})).click(this.cancelClose.bind(this)); this.saveBtn.text(this.opt.saveText); this.cancelBtn.text(this.opt.cancelText); this.container = $(new Element('div', {'class':"selected-container"})); this.innerTooltip = $(new Element('div', {'id':'edit_'+this.opt.fieldName, 'class':'tooltip-inner'})) .append('
'+this.opt.tooltipTitle+'
').append(this.container).append(this.cancelBtn).append(this.saveBtn); if(this.rowList.size() > 0){ this.addItemRow = ''; this.rowList.each(this.createRowItem.bind(this));// this.addValues = this.container.serializeElement(); } this.items = $(new Element('div',{'class':'items_'+this.opt.fieldName})).append(this.addItemRow); this.container.append(this.titleRow).append(this.items)/*.append(this.addItemRow)*/; this.addValues = this.container.serializeElement(); this.tooltip = $(new Element('span', {'class':'tooltip'})).append(new Element('div', {'class':'tooltip-arrow'})).append(this.innerTooltip); this.tooltip.find("select").createSelect(); if(!Object.isArray(this.opt.data)){ this.opt.data = []; } if(this.opt.showEvent !== false){ this.bind(this.opt.showEvent, this.showTooltip.bind(this)); } if(this.opt.hideEvent !== false){ this.bind(this.opt.hideEvent, this.cancelClose.bind(this)); } this.addAllItems(); return this; }, createTitle: function(col){ if(this.opt.columns[col].title !== false){ this.titleRow.append(new Element('li', {'class':this.opt.columns[col].className}).insert(this.opt.columns[col].title)); } }, createRowItem: function(row){ var label,content; label = ''; switch(this.opt.rows[row].type){ case 'input': content = ''; break; case 'content': content = this.opt.rows[row].content.gsub('{fieldName}',this.opt.fieldName).gsub('{name}',row); break; } this.addItemRow += ''; }, filterVal: function(col, val){ if(typeof this.opt.columns[col].filter == 'function'){ return this.opt.columns[col].filter(val); } return val; }, showTooltip: function(){ var pos = {},parentParagraph,pleft; $('.tooltip').remove(); $('body').append(this.tooltip); this.tooltip.hide(); parentParagraph = $(this).parents('p').size() > 0 ? $(this).parents('p').eq(0) : $(this).parents('div.form'); offset = this.offset(); pos.left = (offset.left+(this.realWidth()/2))-(this.tooltip.realWidth()/2); pos.top = offset.top+this.realHeight()+5; if(parentParagraph.size() > 0){ pleft = parentParagraph.offset().left; pright = pleft+parentParagraph.realWidth()+24; if(pos.left pright){ pos.left = pright-this.tooltip.realWidth()-34; $('.tooltip-arrow').addClass('right').css({'left':(offset.left-pos.left)+(this.realWidth()/2)-10}); } else { $('.tooltip-arrow').removeClass('left').removeClass('right') } } this.tooltip.css({'top':pos.top+"px", 'left':pos.left+"px"}); this.saveBtn.unbind('click').bind("click",this.saveData.bind(this)); this.cancelBtn.unbind('click').bind("click",this.cancelClose.bind(this)); this.tooltip.fadeIn('slow', function () { this.onshowfunc(); this.tooltip.find('select').createSelect(); }.bind(this)); }, removeItem: function(e){ var el = $(e.currentTarget),id; id = el.identify().gsub(this.opt.fieldName+'_', ''); this.opt.data = this.opt.data.without(this.opt.data[id]); this.items.empty(); this.addAllItems(); this.tooltip.find('.remove-item').bind('click', this.removeItem.bind(this)); }, addAllItems: function(){ if(Object.isArray(this.opt.data) && this.opt.data.size() > 0){ this.opt.data.each(function(data, i){ var row=$(new Element('ul', {'class':'list-table'})); this.columnList.each(function(col){ var val = !Object.isUndefined(data[col]) ? data[col] != "" ? data[col] : ' ' : ' '; customClass = val != ' ' ? ' '+col+'-custom-'+val : 0; val = this.filterVal(col, val); val.length > 135 ? customClass+=' overflow' : 0; if (col !== 'removeItem' && col !== 'addBtn') { // for geysers if (col == 'isSolar' || col == 'geyserOutside') { var options = $(this.opt.columns[col].content).find('option'); options.each(function (i,v) { o = $(v); if (o.val() != '' && o.val() == val) { val = o.text(); } }); } $('#'+col).val(''); row.append(new Element('li', {'class':this.opt.columns[col].className+customClass}).insert({'bottom':val})); } else if(col === 'removeItem'){ row.append(new Element('li', {'class':this.opt.columns[col].className}) .insert({'bottom':this.opt.columns[col].content.gsub('{fieldName}',this.opt.fieldName).gsub('{key}',i)})); } }.bind(this)); this.items.append(row); }.bind(this)) } }, checkEmptyValues: function(){ var values = this.addValues.getCurrentValues(),ret=false; Object.keys(values).each(function(key){ if(values[key] != ""){ ret = true } }); return ret; }, saveData: function(e){ e.preventDefault(); e.stopPropagation(); var canClose = false; if ($('#model').size() > 0) { if (parseInt($('#model :selected').val()) > 0) { canClose = true; } } if(canClose !== false){ this.opt.onsave(this.opt.data, this.identify()); this.closeTooltip(); //log(this.identify()); $('#'+this.identify()).blur(); } else { $.alert('Please select your make, model group, year and model.'); } }, cancelClose: function(e){ e.preventDefault(); e.stopPropagation(); this.closeTooltip(); this.opt.oncancel(this.opt.data, this.identify()); }, closeTooltip: function(){ this.tooltip.find('.add-item').unbind('click'); this.tooltip.find('.remove-item').unbind('click'); this.cancelBtn.unbind('click'); this.saveBtn.unbind('click'); this.tooltip.remove(); }, isEmptyFunction: function(func){ if(Object.isFunction(func)){ return func.toString() === "function () { }"; } else { return true; } }});// TO BE MERGED INTO COMMON.JS FOR PRODUCTION/** * This is a clientside Fields "Database". It contains indexed fielddata for the current * pages form along with predefined functions to manipulate and retrieve the data quickly * and easily. */var $FD;var MiFields = Class.create((function(){function initialize(array) {this._object = {};array.each(function(obj, i){this._object[i] = obj;}.bind(this));// this._index = {};updateIndex.apply(this);// this._each(function(f){// if(typeof f.obj == 'object'){// this._index[f.obj.fieldId] = f.key;// this._index[f.obj.fieldName] = f.key;// }// }.bind(this));window.$FD = function(id){return this.getField(id);}.bind(this);}function updateIndex(){var index = {},dfix=[];this._each(function(d){var pdata={},f=d.obj,i=d.key,parentFields,pc;index[f.fieldId] = i;index[f.fieldName] = i;if(f.parentFields !== null && !Object.isUndefined(f.parentFields)){parentFields = Object.keys(f.parentFields);// console.log(parentFields);pc = parentFields.size();if(pc > 0){dfix.push(i);parentFields.each(function(parent){if(typeof index[parent+"_dependents"] == 'undefined')index[parent+"_dependents"] = [];index[parent+"_dependents"].push(f.fieldId);});}}}); dfix.each(function(i){var p,f = this._object[i],parentFields;parentFields = Object.keys(f.parentFields);//parentFields.size() > 1 ? console.log(f) : 0;parentFields.each(function(parent){//console.log(parent);parentFieldName = this._object[index[parent]].fieldName;if(typeof index[parentFieldName+"_dependents"] == 'undefined')index[parentFieldName+"_dependents"] = [];index[parentFieldName+"_dependents"].push(f.fieldName);this._object[i].dependsOnField = parentFieldName;}.bind(this))}.bind(this));this._index = index;this.initialized = true;}function _each(iterator) {for (var key in this._object) {var obj = this._object[key], pair = [key, obj];pair.key = key;pair.obj = obj;iterator(pair);}}function getFieldKey(s){if(Object.isString(s)){if(s.match('field_')){s = s.gsub('field_', '');}}return this._index[s];}function setValue(s, key, value){s = this.getFieldKey(s); if (key == 'displayName') { value = escape(value); } if (key == 'tiaValue') { value = escape(value); }return this._object[s][key] = value;}function resetFieldSaveValues(s){s = this.getFieldKey(s);this._object[s]['displayValue'] = '';this._object[s]['tiaValue'] = '';$('.active', $('#field_'+this._object[s]['fieldId']).parents('.field')).removeClass('active');$('#field_'+this._object[s]['fieldId']).val('');}function setFieldVal(s, tia, display){ //log(s);log(tia);log(display);s = this.getFieldKey(s); //log(s);if (typeof display == 'undefined') { if (typeof this._object[s]['displayValue'] != 'undefined' && this._object[s]['displayValue'] != '') { display = this._object[s]['displayValue']; } else { display = tia; } } if (!Object.isUndefined(this._object[s])) { this._object[s]['displayValue'] = escape(display); this._object[s]['tiaValue'] = (typeof tia == 'string') ? escape(tia) : tia; }return this._object[s];}function getValue(s, key) {s = this.getFieldKey(s); return this._object[s][key];}function getFieldById(s) {return this.getField(s);}function getFieldByName(s) {return this.getField(s);}function getFieldDependencies(s){return this._index[s+'_dependents'];} function getField(s) { var field = this._object[(this.getFieldKey(s))];if(typeof field === 'object' && !Object.isUndefined(field.tiaValue) && !Object.isUndefined(field.displayValue)){field = Object.extend(field, {tiaValue:Object.isString(field.tiaValue) ? unescape(field.tiaValue) : field.tiaValue,displayValue:unescape(field.displayValue)});}return field; }function storyText(fieldId, fieldValue){var fieldObj = this.getField(fieldId), storyText = false, story_text = false;//log(fieldObj);if (!Object.isUndefined(fieldObj)) {if (!Object.isUndefined(fieldObj.storyText)) {if (!Object.isUndefined(fieldObj.storyText[strId])) {storyText = unescape(fieldObj.storyText[strId][fieldValue])}} //log(storyText);if (!storyText) {story_text = fieldObj.story_text_for_field; //log(story_text);if (story_text != null && !Object.isUndefined(story_text)) {storyText = unescape(story_text[fieldValue]/*.base64_decode()*/)} else { //log(fieldObj.fieldValues); //log(fieldValue);if(fieldObj.fieldValues != null){if(Object.isArray(fieldObj.fieldValues.array)){fieldObj.fieldValues.array.each(function(val){if(val.valueId == fieldValue){storyText = val.displayName;}});}}}}return storyText;}return fieldObj;}function extractData(filter){var data = {};this._each(function(f){// if (f.obj.fieldName == 'previouslosses') {// log('1');// log(f.obj.displayValue);// log(f.obj.tiaValue);// log(escape(unescape(f.obj.displayValue)));// } //if ($('#field_' + f.obj.fieldId + ':not(.dep-hidden)').size() > 0) {typeof f.obj.displayValue == 'undefined' ? f.obj.displayValue = '' : 0;typeof f.obj.tiaValue == 'undefined' ? f.obj.tiaValue = '' : 0;//if (f.obj.fieldName == 'previouslosses') {// log('2');// log(f.obj.displayValue);// log(f.obj.tiaValue);// log(typeof f.obj.tiaValue);// log(f.obj.tiaValue != "");//}if (f.obj.displayValue != "" && f.obj.tiaValue !== "" ) {if(Object.isArray(filter)){if(filter.hasVal(f.obj.fieldName) || filter.hasVal(""+f.obj.fieldId)){data[f.obj.fieldName] = {displayValue: escape(unescape(f.obj.displayValue)),tiaValue: (typeof f.obj.tiaValue == 'string') ? escape(unescape(f.obj.tiaValue)) : f.obj.tiaValue}}} else {data[f.obj.fieldName] = {displayValue: escape(unescape(f.obj.displayValue)),tiaValue: (typeof f.obj.tiaValue == 'string') ? escape(unescape(f.obj.tiaValue)) : f.obj.tiaValue}}} else if(f.obj.fieldName.match('password') && $('input[name="'+f.obj.fieldName+'"]').val() != ""){data[f.obj.fieldName] = {displayValue: $('input[name="'+f.obj.fieldName+'"]').val(),tiaValue: $('input[name="'+f.obj.fieldName+'"]').val()}} // }}); //log(data['previouslosses']);return data;}function getQueryString(){return Object.toQueryString(this.extractData());}function getPercentComplete(){var completed=0,total=0;this._each(function(f){if(!Object.isUndefined(f.obj.tiaValue)){if(f.obj.tiaValue != "")completed = completed+1;}total = total+1;});return Math.round((completed/total)*100);}return {initialize: initialize,_each: _each,getFieldKey:getFieldKey,setValue:setValue,setFieldVal:setFieldVal,resetFieldSaveValues:resetFieldSaveValues,getValue:getValue,getField:getField,getFieldById:getFieldById,getFieldByName:getFieldByName,getFieldDependencies:getFieldDependencies,storyText:storyText,extractData:extractData,getQueryString:getQueryString,getPercentComplete:getPercentComplete};})());if(typeof fieldData != 'undefined'){var FieldData = new MiFields(fieldData);//fieldData = false;//delete fieldData;};MiApplication.addMethods({ updateServer: function(e) { var fieldId,el,value; el = $(e.target); fieldId = el.attr('name'); value = this.formValues.getCurrentValues()[fieldId]; if (Object.isUndefined(value)) { try { value = el.val(); } catch (err) { } } if (Object.isUndefined(value)) { try { value = $FD(fieldId).tiaValue; } catch (err) { } } if ($('input[name="'+fieldId+'"]').hasClass('check_insured_value')) { value = value.replace(/\s/, ''); } if (!Object.isUndefined(el.attr('placeholder')) && value == el.attr('placeholder')) { value = ''; } if(!el.hasClass('noupdate')){ FieldData.setFieldVal(fieldId, value); } el.valid && el.valid(); }});// buildingNo: "string",// postalCode: "string",// boxStreet: "string",// area: "string",// buildingName: "string",// suburb: "string",// streetNumber: "string",// streetName: "string",// longitude: "decimal",// latitude: "decimal"var MiForm, dev_test;window.product_id = 'WHEEL';$(document).ready(function() { new Image().src = '/images/ajax-loader-snake.gif'; $('.app-form-callback-cta').unbind('click').click(function (e) { e.preventDefault(); var el = $(this), formCont = $('#'+el.data('form')), callbackCont = $('#'+el.data('callback')), pluginId = el.data('form').gsub('form', ''); if (formCont.is(':visible')) { formCont.css('min-height', formCont.realHeight()); callbackCont.css('min-height', formCont.realHeight()); formCont.fadeOut('fast', function () { callbackCont.fadeIn('fast', function () { formCont.css('min-height', ''); callbackCont.css('min-height', ''); }); }); Miway.Tracking.pixelTrack(312994); try { callbackCont.find('form#callbackForm1020').data('obj').validate(); } catch (err) { } } else { formCont.css('min-height', formCont.realHeight()); callbackCont.css('min-height', formCont.realHeight()); callbackCont.fadeOut('fast', function () { formCont.fadeIn('fast', function () { formCont.css('min-height', ''); callbackCont.css('min-height', ''); }); }); //el.find('a').text('Request a callback!'); } });;MiForm = new MiApplication({ formValuesSelect: '#miwayForm1020_container', helpTimeout:300, app_id:0, product_id:'WHEEL', miwy_fa:'get_initial_quote', miwy_np:'101', cur_step:0, validationSelect: '#miwayForm1020', formSubmitBtn: $('#miwayForm1020 .form_submit'),getFormData:function(){ $('#miwayForm1020 input, #miwayForm1020 select').each(function () { $(this).fire('blur'); }); var postObj={ miwy_fa:this.opt.miwy_fa, app_id:this.opt.app_id, productId:this.opt.product_id, miwy_np:this.opt.miwy_np, noValidate: parseInt($('input[name="noValidate"]').val()), data:Object.toJSON(FieldData.extractData()) } return Object.toQueryString(postObj); },onInit: function(){ // tracking "started" on first field focus $('#miwayForm1020').find('input, select').not('[type="hidden"]').focus(function () { if ($(this).parents('form').data('started') != true) { trackPageview('/gagoal/started-WHEEL-insurance'); $(this).parents('form').data('started', true); } });this.addressFields = $(".address, .fulladdress"); if(this.addressFields.size() > 0){ this.addressFields.each(function(i){ this.createAddrAutocomplete(this.addressFields[i]); }.bind(this)); } this.vehicleSearch = $("input[name='make_model']"); if(this.vehicleSearch.size() > 0){ this.createVehicleAutocomplete(this.vehicleSearch); } if ($(".datepicker").size() > 0) { $(".datepicker").datepicker({ dateFormat: "yy-mm-dd", changeMonth:true, changeYear:true }); } $(".hidden").parents('div.field').hide(); $('#miwayForm1020').find('input:not(:checkbox), select').blur(this.updateServer.bind(this)); $('#miwayForm1020').find('input:checkbox').change(this.updateServer.bind(this));$('#miwayForm1020').find('select').createSelect({colMax:1,limiton:'columns', optionsClass: 'custom-car', colWidth: 210});clearTimeout(this.helpTimer);$('#miwayForm1020').find('input, select').focus(this.resetHelpTimer.bind(this));// $('form.validate input.auto_alt_toggle').setDefaultValue(); this.bindSubmit(); $('#miwayForm1020').find('input, select').not('[type="checkbox"]').blur(function () { $(this).parents('div.field').find('div.question').trigger('mouseleave'); }); $('#miwayForm1020').find('input, select').not('[type="checkbox"]').focus(function () { $(this).parents('div.field').find('div.question').trigger('mouseover'); });}});});*SpeedQuote
The quoted premium will only be illustrative and not a binding offer.
Are you looking for car insurance to suit your budget, with benefits like free roadside assistance and rewards even if you claimed? MiWay offers flexible and affordable motor insurance, we even allow you to fix your premiums for a period of 36 months!*
MiWay will reward you if you prefer doing things online! By simply applying for and taking out your car insurance policy online, MiWay will pay you an average full month's premium after 3 months full premiums are received.*
*Terms & conditions apply
Why choose MiWay's standard Car Insurance?
- Affordable premiums, low flat excess
- Apply and buy your car insurance online to earn extra rewards
- Great Service, hassle free claims process
- Earn rewards whether you claim or not
- Free Roadside emergency assistance
- Earn rewards and save on joining fees by buying your car insurance online
- Fix your premiums for a period of 36 months!*
*Terms & conditions apply
Types of Car Insurance
MiWay offers three types of car insurance Comprehensive, Third Party Fire and Theft, and Third Party only.
Comprehensive car insurance provides the widest cover and covers for theft and hijacking, damages due to an accident, fire or explosion and natural disasters like hail and floods. Comprehensive cover also includes damage to the vehicles glass and liability to other parties as a result of an accident.
Third Party Fire and Theft insurance provides insurance cover for any damage you may cause to the vehicle of another person, and the accidental death or injuries of third parties involved in the same accident. You will also be compensated for the loss of your vehicle due to attempted theft, theft or hijacking, as well as any damage to your vehicle that was caused by fire, lightning or explosions.The main difference between 'Comprehensive' and 'Third Party Fire and Theft' is that your car is not covered against accidental damage.
Third Party Only insurance is the cheapest car insurance and provides insurance cover for any damage you may cause to the vehicle of another person as well as the accidental death or injuries of third parties involved in the same accident. You have no cover under this insurance type against the loss of, or damage to your own vehicle.
Car Insurance Options
In addition to accident or theft, comprehensive car insurance in South Africa covers losses due to fire and explosion, natural disasters like hail and floods and damage to the vehicles glass.
Additional options such as car hire and cover for non-standard sound systems and car accessories can also be added to your motor insurance policy.
MiWay can cover your car for either private, professional or business use:
Private or social purposes, including driving between your home and regular place of work will be classified as private use.
Professional use is where the car forms an essential part of the performance of any work or function as a Lawyer, Doctor, Actuary, Accountant, Architect or an Engineer and it also includes private use.
Business use is where the car forms an essential part of the performance of any work or function and it also includes private use.
Scenario: If you utilise your car for business purposes, your car is on the road more often than if you only use it for private purposes. The chance of it being stolen or involved in an accident is therefore much greater. The premium for a car being used for business purposes is higher compared to the same car being used only for private purposes. If you insure your car for the incorrect use you will not have cover on your car in the event of a claim as the premium paid will be incorrect.
Your vehicle can be insured for one of the following values:
- Retail value
- Market value (the average between the vehicles retail and trade values)
- Trade value
- Specially agreed value (which applies to unlisted, collectors and vintage vehicles where a valuation is given by an appropriate approved source)
Your policy coversheet reflects the value that you chose. The amount to this value will be determined at the time of loss taking into account the age, mileage and condition of the vehicle.
What process is involved in getting your vehicle insured?
The car insurance process starts with you, the car owner, completing an insurance quote from MiWay online or telephonically. Assuming you find the premium affordable, which we are sure you will, you agree to a start date for your new cover. MiWay will send you your documentation including a Coversheet (Policy schedule), which spells out the terms of your insurance policy and explains everything you need to know regarding your policy and car insurance in general. If necessary, MiWay will also help you to find an inspection centre which is convenient for you to visit. Your vehicle insurance cover will be fully activated once MiWay has received your premium. Please remember to comply with any requirements, i.e. have your car inspected, install additional security devices (like a tracking device, immobilizer etc), as this will influence whether you would enjoy insurance cover or not.
'); // and refer to this reference number:
'+(retData.ref || 'ERROR')+'$('html, body').animate({ scrollTop: $('div.thank_you:first').offset().top - 50 }, 200); Miway.Tracking.pixelTrack(312984, retData.ref); trackPageview('/gagoal/request-a-call/product-success/' +(this.form.find('input[name="callmeback_product"]').val() || 'err')); } else if (parseInt(retData.errors.length) > 0) { html = ''; $.each(retData.errors, function (index, value) { html += '
' + value + '
'; }); $.alert({ alertHtml:html, alertType: 'warn'}); } }.bind(this), error: function (request, status, error) { this.unload(); $.alert({ alertHtml:'
Sorry, an unknown error has occured. Please try again.
', alertType:'warn'}); this.ajaxErrors += (error.toString() + '|||'); $('html, body').animate({ scrollTop: this.form.offset().top - 50 }, 200); }.bind(this) }); } else { this.validation = this.validate(); $('form#callbackForm1020 input, form#callbackForm1020 textarea').setDefaultValue(); } }, load: function () { this.formSubmitBtn.text('sending...').addClass('disabled').unbind('click'); $(this.loaderImg).insertAfter(this.formSubmitBtn); }, unload: function () { this.formSubmitBtn.text(this.defaultSubmitText).removeClass('disabled'); $('.loader').remove(); this.addSubmit(); }, addSubmit: function () { // attach submit this.formSubmitBtn.unbind('click').click(function (e) { if (this.debug) log(this.formSubmitBtn.text() + ' - click'); e.preventDefault(); this.submit(); }.bind(this)); }}); var btnHtml = '
'; $('#callback1020 .plugin.vertical').append(btnHtml);
{body}
', licenseSelect: '',selectEl:'',optionEl:'',button:'{text}'// address:''},initialize: function(options){var switches,loadScreenImage;this.opt = Object.extend({helpTimeout:300,formSubmitBtn:$('.form_submit'),product_id:'',app_id:0,miwy_np:0,cur_step:2, isMixpress: false,miwy_fa:'', form_type:'',getFormData:ProtoBits.emptyFunction,onInit:ProtoBits.emptyFunction, submitUrl: "/misc/xhr/form_actions.php", validationSelect: '.form.tab-container:visible form.validate', formValuesSelect: '#content'}, options || {});// if (this.opt.isMixpress == true) { loadScreenImage = '/images/generic-loader-pink-big.gif';// } else if (/*$('input[name="product_id"]').size() > 0 && */this.opt.product_id.length > 0){// loadScreenImage = '/images/' + this.opt.product_id.toLowerCase().strip() + '-loader.gif';// } this.loadScreen = new LoadScreen({ 'image':loadScreenImage, 'message':"Please wait...", 'disableClose':true, 'disableCloseTimeout':0, 'extraTopOffset': (-100), 'extraMessageTop': 120 }); this.loadScreen.show({image:false,color:"transparent",opacity:0,message:''});this.helpTimer = setTimeout(this.pageAssist.bind(this), (this.opt.helpTimeout*1000));this.getFormData = this.opt.getFormData.bind(this);this.oninit = this.opt.onInit.bind(this); this.validate();$('body').append(this.loader);this.loader = $("#ajax_loader");this.loader.remove(); shortSwitches = $('.form-column.full .yesno-switch:not(.switch-active)');longSwitches = $('.form-column:not(.full) .yesno-switch:not(.switch-active)'); sideSwitches = $('.form_top_right .yesno-switch:not(.switch-active), .insurance_quotes .yesno-switch:not(.switch-active)'); shortSwitches.parents('div.field-input').find('.question').addClass('yesno'); longSwitches.parents('div.field-input').find('.question').addClass('yesno');sideSwitches.parents('div.field-input').find('.question').addClass('yesno');setTimeout(function(){ longSwitches.createInputSwitch({ handleOnPosition:0, customClass:'long', checkedLabel:'YES', uncheckedLabel:'NO' }); setTimeout(function () { shortSwitches.createInputSwitch({ handleOnPosition:0, //customClass:'long', checkedLabel:'YES', uncheckedLabel:'NO', customClass: 'short' }); setTimeout(function () { sideSwitches.createInputSwitch({ handleOnPosition:0, customClass:'short', checkedLabel:'YES', uncheckedLabel:'NO' }); }, 50); }, 50);}, 50); $('div.field .yesno-radio').createYesNoInput();this.formValues = $(this.opt.formValuesSelect).serializeElement(); if ($('#form_help_bar').size() > 0) { this.sidebarStartTop = $('#form_help_bar').offset().top; }this.oninit(); setTimeout(function () { this.loadScreen.close(); $("input[name='fullnames'], input[name='surname'], input[name='fullnames_regulardriver'], input[name='surname_regulardriver'], input[name='preferredname'], input[name='preferredname_regulardriver']").on("keyup", function(){ try{ $(this).val($(this).val().split(" ").invoke("capitalize").join(" ")); }catch(e){} }); }.bind(this), 500); this.validate(); if (!Object.isUndefined(this.opt.isMixpress) && this.opt.isMixpress == true) { $('.prefer_story').hide().remove(); } $('input.number').each(function(){var el = $(this),validInputs=['insured_value','sum_insured','building_value','insured','jewellery_insurance'];if(validInputs.hasVal(el.attr('name'))){el.insert({'before':'R
'});}}); //temp fix for insured_value if($("input[name='insured_value']").val() != null){$("input[name='insured_value']").insert({'before':'R
'});} // make/model/year and brand new or used $AR('beforeSubmit', this.preSubmit, 0, this); $(document).ready(function () { window.lastYearVal = 0; if (typeof $FD('year') != 'undefined') { window.checkYearInterval = setInterval(function () { var yearVal = $FD('year').tiaValue; if (yearVal.length == 4 && yearVal != window.lastYearVal) { var el = $('select[name="brand_new__used__rebuild"]') || []; if (el.size() > 0) { if (parseInt(yearVal) Brand new'}); el.createSelect(); } } else { clearInterval(window.checkYearInterval); } } window.lastYearVal = yearVal; }, 1000); } }); var fields = $('.container').find('[name="make_model"],[name="property_address"],[name="building_address"],[name="night_time_suburb"],[name="day_time_suburb"]'); fields.on('mouseup', function (ev) { this.select(); });// if (!Object.isUndefined(globals.global_ssl_enabled) && parseInt(globals.global_ssl_enabled) == 1) {// var sUrl = this.opt.submitUrl;// if (!Object.isUndefined(sUrl) && sUrl != null && sUrl != '') {// var hname = document.location.hostname;// if (sUrl.substr(0,1) == '/') {// sUrl = 'https://'+hname+sUrl;// }// }// this.opt.submitUrl = sUrl;// delete sUrl;// }}, switchToForm: function(){ trackEvent('form preference', 'switch form', 'to form'); window.onbeforeunload = ProtoBits.emptyFunction; var ls = new LoadScreen({ 'image': '/images/generic-loader-pink-big.gif', 'message': '', 'disableClose':true, 'disableCloseTimeout':0, 'extraTopOffset': (-100), 'extraMessageTop': 120 }); ls.show('Please wait while we load a normal form for you...'); setTimeout(function () { $("#normal_form").submit(); }, 1000); }, switchToStory: function(){ trackEvent('form preference', 'switch form', 'to story'); window.onbeforeunload = ProtoBits.emptyFunction; var ls = new LoadScreen({ 'image': '/images/generic-loader-pink-big.gif', 'message': '', 'disableClose':true, 'disableCloseTimeout':0, 'extraTopOffset': (-100), 'extraMessageTop': 120 }); ls.show('Please wait while we load the story version...'); setTimeout(function () { $("#story_form").submit(); }, 1000); },setupSidebar:function(el, anchor){$('body').append(this.help_arrow);this.help_arrow = $('div.form_help_arrow');this.help_arrow.hide(); if ($('#form_help_bar').size() > 0 || $(el).size() > 0) { this.sideBar = Object.isUndefined(el) ? $('#form_help_bar') : $(el);if(this.sideBar !== null && this.sideBar.size() > 0){ this.innerSideBar = this.sideBar.find('div.plugin'); this.sideBarComplete = this.sideBar.find('div.percent_complete');this.sideBarTitle = this.sideBar.find('div#percent_complete h2'); this.scrollAnchor = Object.isUndefined(anchor) ? $("#tabs_container") : $(anchor); this.sidebarOffsetTop = this.sideBar.offset().top;this.sideBarTitle.hide(); this.help_arrow.css({'left':(this.sideBar.offset().left-30)+'px'}); this.sideBar.css("position", "relative"); this.scrolling = false;}// $(document)._on('mousewheel','',this.scrollSidebar.bind(this));// $(document).bind('scroll', this.scrollSidebar.bind(this)); }}, updateSidebar: function (id) { this.help_arrow = $('div.form_help_arrow'); if (typeof id == 'string' && typeof this.sidebarStartTop != 'undefined') { var el = $('#'+id), helpDiv = $('div.help_text');; if (el.size() > 0) {// log('updateSidebar');// log(el.parents('div.field').offset());// log(this.sidebarStartTop); var arrowTop = ((el.parents('div.field').offset().top)-40), fieldTop = el.parents('div.field').offset().top, newmargin,contentDiv = el.parents('.tab-container'),contentMax = (contentDiv.offset() != null ? contentDiv.offset().top : 0) + contentDiv.height(),newmargin = fieldTop - this.sidebarStartTop - 158;// 58 is to center the center of the arrow with the heading in the "compliance copy"// log(newmargin);// log(newmargin+this.sideBar.height()+this.sidebarStartTop+$('div#form_help_bar .form_top_right').height());// log(contentMax); //$('div.form_help_arrow').css({'top': arrowTop+'px'}).show('fade',200);(newmargin+this.sideBar.height()+this.sidebarStartTop+$('div#form_help_bar .form_top_right').height()) > contentMax ? newmargin = (contentMax -this.sidebarOffsetTop- this.sideBar.height()-$('div#form_help_bar .form_top_right').height()): 0;// log("margin-top:"+newmargin);this.sideBarTitle.show(); this.sideBar.animate({'margin-top':newmargin+'px'}, 250); this.help_arrow.show().animate({'top': (el.parents('div.field').offset().top-34)+'px'}, 250); if(typeof this.helpText != 'undefined' && this.helpText != "" && this.helpText != helpDiv.html()){ helpDiv.html(this.helpText); helpDiv.show('fade'); //helpDiv.fadeIn(); this.helpText = "" } } } if ($('#form_help_bar').size() > 0) { this.help_arrow.css({'left':($('#form_help_bar').offset().left-30)+'px'}); //log(this.help_arrow.css('left')); } },scrollSidebar: function(e){var top,padding,limit,wh,ih;top = ($(document).scrollTop()-this.sidebarOffsetTop)+10;padding = $('.form_top_right').cssUnit('padding')[0];Object.isUndefined(padding) ? padding = 0 : 0;limit = ((this.scrollAnchor.offset().top-this.sidebarOffsetTop)+this.scrollAnchor.realHeight())-this.sideBar.realHeight()/*+(padding*2)))-5*/;wh = ($(window).height()-20);ih = wh-(this.sideBarComplete.height()+this.innerSideBar.cssUnit('paddingTop')[0]+this.innerSideBar.cssUnit('paddingBottom')[0]+this.innerSideBar.cssUnit('marginTop')[0]+this.innerSideBar.cssUnit('marginBottom')[0]+90); this.scrolling = false;//if(top > -1){//if(top 0) {// Object.isFunction(this.setRowActive) ? this.setRowActive($(el)) : 0;// }if (!this.helpLocked) {var elId,field;el = $(el);elId = el.find('input,select').identify(); if (Object.isFunction(elId.gsub)) { elId = elId.gsub('_hiddeninput',''); }field = $FD(elId); if (Object.isFunction(e.stop)) e.stop();if(this.arrowTimer){clearTimeout(this.arrowTimer);this.arrowTimer = false;this.pageY = (el.offset().top);this.helpText = !Object.isUndefined(field) ? (field.long_help_txt || field.fieldDisplayName) : "";}if(!this.arrowTimer){this.arrowTimer = setTimeout(function(e){ this.updateSidebar(elId);this.arrowTimer = false}.bind(this), 250)}}},activateLicenseField: function() {this.licenses = $('.do_licenses');if (this.licenses.size() > 0) { var date = new Date(); var currentMonth = date.getMonth(); var currentDate = date.getDate(); var currentYear = date.getFullYear(); this.licenses.each(function () { var fieldId = $(this).identify(),fieldName=$(this).attr('name'),c,data,textValue;data = (typeof $FD(fieldName).tiaValue == 'object' && !Object.isUndefined($FD(fieldName).tiaValue.array) ? $FD(fieldName).tiaValue.array : $FD(fieldName).tiaValue)|| [];c = data.size();if(c > 0){textValue = c+(c == 1 ? ' licence' : ' licences');FieldData.setFieldVal(fieldName, data, textValue);$('#'+fieldId).text(textValue);} $(this).customField({ columns: { licenseType: { title:"Licence Type", className:'name', type:'content', content:'' }, licenseDate: { title:"Issue Date", className:'data', type:'input', inputClass:'date required' } }, onvalidate : function(value){ for (var i = 0; i 0) { var currentMil = parseInt(new Date().getFullYear().toString().slice(0,2)); var currentYear = parseInt(new Date().getFullYear().toString().slice(2,4)); y = parseInt(idnum.slice(0,2)); if (y > currentYear && y.toString() != '0') { y = parseInt(((currentMil - 1).toString() + y.toString())); } else { y = parseInt(((currentMil).toString() + y.toString())); } m=parseInt(idnum.slice(2,4))-1; d=parseInt(idnum.slice(4,6)); dob = new Date(y,m,d); eighteen = parseInt(dob.getFullYear()) + 18; var currentFullYear = parseInt(currentMil.toString() + currentYear.toString()); var diff = (new Date().getFullYear()) - eighteen; } else { var diff = 30; } function checkDisabledMonths(y, ui) { //log(eighteen); //log(ui); setTimeout(function () { $('[data-month]').find('a').removeClass('ui-state-disabled'); var d = new Date()/*, months = {'January':0, 'February':1, 'March':2, 'April':3, 'May':4, 'June':5, 'July':6, 'August':7, 'September':8, 'October':9, 'November':10, 'December':11}*/; if (ui.selectedYear == eighteen) { d.setFullYear(eighteen); d.setMonth((parseInt(idnum.slice(2,4)))-1); //log(d.getMonth()); for (i = 0;i 0) { var d = new Date(); d.setFullYear(eighteen); sett.defaultDate = d; } //} date.monthpicker(sett); $('.ui-monthpicker-trigger').remove(); date.attr('readonly','readonly'); $('#licenseType').createSelect(); }, showEvent: ['click','focus'],// hideEvent: 'blur', tooltipTitle: $FD('licenses').help_txt, fieldName: $FD('licenses').fieldName, onsave: function(data) { var c = data.size(),textValue; textValue = c+(c == 1 ? ' licence' : ' licences');// console.log(data); FieldData.setFieldVal(fieldName, data, textValue); $('#'+fieldId).text(textValue); if ($('#'+fieldId+'_hiddeninput').size() > 0) { $('#'+fieldId+'_hiddeninput').val(textValue).blur().valid(); } }, saveText: 'Save Licences', data: data }); });}},createVehicleAutocomplete: function(el){var type = this.opt.product_id;this.vs = $(el).autoComplete({ showAlternateCar: true, keywordType: this.opt.product_id,dataUrl:"/misc/xhr/vehicle_search.php",addFilter: function(obj){var data = {};data[obj.makeModelCode] = obj;return data;},keywordFilter: function(keyword){keyword.match('vw') ? keyword = keyword.gsub("vw", 'volkswagen') : 0return keyword;},dataFilter: function(o){ //if (!Object.isUndefined(o[0]) && o[0] != 'null') { if (Object.isString(o[1].name)) { var matchString = (o[1].name.toLowerCase()).match(this.keyword) != null ? (o[1].name.toLowerCase()).match(this.keyword) : (o[1].tags.toLowerCase()).match(this.keyword); if(matchString == null){ var arrSearchTerm = this.keyword.split(' '); for (var i = 0; i '+years+''; } d[o[0]] = vname; return d; } } //}},clickResult:function(e, el){el = $(el);if(el.identify() != "no_select"){var code,data,name;name = this.getText(el);code = el.identify(); switch(code) { case 'carcantfind': // Can't find your car? //log('-11 !'); $(this.el).removeClass('error').parents('.error').removeClass('error'); $(this.el).parents('div.field').find('.message').text(''); this.carTooltip = $(this.el).customCarField({ onsave: function (data, id) { var code = $('#model :selected').val(); var textValue = $('select[name="custom"]#make :selected').val() + ' ' + $('select[name="custom"]#name :selected').val() + ' ' + $('select[name="custom"]#model :selected').text();var year =$('#carYear :selected').text(); $('#'+id).val(year + ' ' + textValue);// this.hiddenInput.val(code);// this.hiddenYearInput.val(year); FieldData.setFieldVal('make_model', code, textValue); FieldData.setFieldVal('year', year, year); try { $('#'+id).valid();$('#'+id).blur(); } catch (err) { } } }, type); this.carTooltip.showTooltip(); this.removeContainer(); setTimeout(function () { var make = $('select[name="custom"]#make'); var name = $('select[name="custom"]#name'); var year = $('select[name="custom"]#carYear'); var model = $('select[name="custom"]#model'); make.unbind('change').createSelect({colMax: 1, optionsClass: 'custom-car', colWidth: 200, colMinWidth: 200}); name.createSelect({colMax: 1, optionsClass: 'custom-car', colWidth: 200, colMinWidth: 200}).attr('disabled', true); year.createSelect({colMax: 1, optionsClass: 'custom-car', colWidth: 200, colMinWidth: 200}).attr('disabled', true); model.createSelect({colMax: 1, optionsClass: 'custom-car', colWidth: 200, colMinWidth: 200}).attr('disabled', true); this.blueLoader = '
' + msg + '
', alertType: 'warn' });// }// }// }// }// } if ($(this.opt.validationSelect).valid() && valid == true) { //log('extra validation section'); var forms = $(this.opt.validationSelect.replace(':visible', '')); forms.valid(); if (parseInt(forms.find('.error').size()) > 0) { var firstError = forms.find('.error').first(); $('a.step_'+firstError.parents('.form.tab-container').identify().replace('tabs-', '')).first().click(); setTimeout(function () { $(this.opt.validationSelect).valid(); firstError = $(this.opt.validationSelect).find('.error').first(); $('html, body').animate({scrollTop: firstError.offset().top - 100}, 250); }.bind(this), 500); } }if ($(this.opt.validationSelect).valid() && valid == true) { //log('valid submit');window.onbeforeunload = ProtoBits.emptyFunction;// if(!this.opt.app_id && !this.opt.isMixpress){// this.load("We are busy gathering data to calculate your premium. Please wait ...");// } else {this.load();// } var valid = false;// if (Object.isUndefined(this.opt.isMixpress) || this.opt.isMixpress == false && (isNaN(this.opt.app_id) || parseInt(this.opt.app_id) 0 || this.opt.isMixpress) { t = 2000; } var doValidate = 0; if ( ( Object.isUndefined(this.opt.isMixpress) || this.opt.isMixpress == false ) && (isNaN(this.opt.app_id) || parseInt(this.opt.app_id) Profile updated!'; html += 'Thank you for updating your details.
'; if (!Object.isUndefined(retData.oldpremium) && !Object.isUndefined(retData.premium)) { if (retData.premium != retData.oldpremium) { html += 'Your old premium: R ' + retData.oldpremium;// + '
'; html += 'Your new premium: R ' + retData.premium + ''; html += '
Please contact the call center if you have any questions.
' + (globals.form_indicative_failed || 'Unfortunately an error occurred while retrieving your insurance information from TransUnion, we apologise for the inconvenience. Please click continue to load our user friendly form in order to complete your quote') + '
',alertType:"info",alertButtons:{ 'Continue': function(){$AC('nextPage');},'Close': function(){ $('input[name="noValidate"]').val(0);return false;} }});} else { if (this.opt.app_id > 0) { // tracking trackPageview('/gagoal/add-quote-success/'+(pId || 'E')); } setTimeout(function () { $AC('nextPage'); }, 1000);} } } else { var html = 'Something may have gone slightly wrong while your last request was being processed. ' + 'Please quote the message below when contacting our call center. ' + ''; if (typeof retData.debug != 'undefined' && retData.debug != null) { html += retData.debug + '
'; } if (typeof retData.errors == 'object' && !isNaN(retData.errors.length) && retData.errors.length > 0) { retData.errors.each(function(error) { html += error + '
'; }); } if (typeof retData.errors == 'string' && retData.errors != '') { html += retData.errors + '
'; } html += ''; $.alert({alertHtml:html, alertType:"error"}); } }.bind(this), error: function(request, status, error) { this.unload(); $('
Sorry, an error ('+error+') has occured. Please try again.
').insertAfter(this.opt.formSubmitBtn); $.alert({alertHtml:"There was an error while trying to complete your request. Please quote the message below when calling the call center about this error.
Sorry, an unknown error has occured. Please try again or call the call center.", alertType:"error"});//("+request.status + '|' + request.statusText+") }.bind(this) }); }.bind(this), t); },checkProgress: function(){ if (Object.isFunction(this.completed.calculate)) { var percentage = this.completed.calculate(); //if(percentage >= 100){ //this.opt.formSubmitBtn.removeClass('disabled'); //this.bindSubmit(); //} }},bindSubmit: function(){// log('bindSubmit');// log(this.opt.formSubmitBtn);// log(this.opt.formSubmitBtn.parents('.form.tab-container'));this.opt.formSubmitBtn.unbind('click').click(this.submit.bind(this));}, load: function() { this.opt.loading = true; $(this.opt.validationSelect + ' input.auto_alt_toggle').clearDefaultValue();var msg = globals['loading_step'+this.opt.cur_step+'_loading_message'];Object.isUndefined(msg) ? msg = "Please wait..." : 0;// if (parseInt(this.opt.app_id) > 0 || this.opt.isMixpress) {// if (parseInt(this.opt.app_id) > 0 || this.opt.isMixpress) { //log('hi'); this.loadScreen.show(msg, globals['loading_step'+this.opt.cur_step+'_loading_block']);//'
'+msg+'
We promise that your premium will not change during a 12 month cycle - even if you have to claim!
Your cover starts from day 1!
We finalise car insurance claims in 4.5 days on average.
Chat to us right now by clicking the live chat button below or keep helping yourself.').gsub('{title}', 'Need some help?'),// alertType:'help',// alertButtons:{// 'Live Chat': function () {// $('#LP_DIV_1350916334825').find('a').click();// this.close();// },// 'No Thanks':function () { //this.close();// }// }// });// if(typeof lpMTagStatic === 'undefined'){// $("head").append(new Element("script", {'type':"text/javascript",'charset':"UTF-8",'src':"https://server.iad.liveperson.net/hc/86496974/?cmd=mTagRepstate&site=86496974&buttonID=7&divID=LP_DIV_1350916334825&bt=3&c=1"}));// }// } else { $.alert({ alertId: 'fieldAssist', alertHtml:this.TEMPLATES.assist.gsub('{body}', '
Request a callback and we\'ll call you right back! ... or keep helping yourself.').gsub('{title}', 'Need some help?'), alertType:'help', alertButtons:{ 'Call me back': function () { $('body').append(''); applyCallmeback(); $('a.call-me-back').first().click(); this.close(); }, 'No Thanks':function () { //this.close(); } } });// }},pageAssist: function(){//$.alert({// alertId: 'pageAssist',//alertHtml:this.TEMPLATES.assist.gsub('{body}', 'page idle assistance popup').gsub('{title}', 'Do you need some assistance?'),//alertType:'help',//alertButtons:{//'Yes': function () { //this.close();//},//'No':function () { //this.close();//}// }//});},preventPageLeave: function(e){//log(e);e.preventDefault();return false;}});////function yesnoChanged (id, newValue) {// if (!Object.isUndefined(id)) {// id = parseInt(id.gsub('field_',''));// $FD(id).tiaValue = newValue;// }//}jClass.create('customCarField', { initialize: function(options, vehicle_type){vType = vehicle_type == "BIKE" ? "Bike" : "Car"; this.opt = Object.extend({ columns: {}, rows:{ make: { label: 'Make', className: 'make', type: 'content', inputClass: 'car_make', content: ''// }, name : { label: 'Model', className: 'model_group', type: 'content', inputClass: 'car_model_group', content: ''// }, year : { label: 'Year', className: 'year', type: 'content', inputClass: 'car_year', content: ''// }, model: { label: vType, className: 'model', type: 'content', inputClass: 'car_model', content: ''// } }, onshow:ProtoBits.emptyFunction, onadd:ProtoBits.emptyFunction, showEvent:false, hideEvent:false, tooltipTitle:'Start with the make of your '+vType.toLowerCase(), fieldName:'custom', saveText:'Save', cancelText:'Cancel', onsave:ProtoBits.emptyFunction, oncancel:ProtoBits.emptyFunction, data:[], disallowMultiple: false }, options || {}); this.onshowfunc = this.opt.onshow.bind(this); this.columnList = Object.keys(this.opt.columns); this.rowList = Object.keys(this.opt.rows); this.saveBtn = $(new Element('a', {'class':'blue_btn save', 'href':'javascript:void(0);','onclick':'return false;'})).click(this.saveData.bind(this)); this.cancelBtn = $(new Element('a', {'class':'blue_btn cancel', 'href':'javascript:void(0);','onclick':'return false;'})).click(this.cancelClose.bind(this)); this.saveBtn.text(this.opt.saveText); this.cancelBtn.text(this.opt.cancelText); this.container = $(new Element('div', {'class':"selected-container"})); this.innerTooltip = $(new Element('div', {'id':'edit_'+this.opt.fieldName, 'class':'tooltip-inner'})) .append('
'+this.opt.tooltipTitle+'
').append(this.container).append(this.cancelBtn).append(this.saveBtn); if(this.rowList.size() > 0){ this.addItemRow = ''; this.rowList.each(this.createRowItem.bind(this));// this.addValues = this.container.serializeElement(); } this.items = $(new Element('div',{'class':'items_'+this.opt.fieldName})).append(this.addItemRow); this.container.append(this.titleRow).append(this.items)/*.append(this.addItemRow)*/; this.addValues = this.container.serializeElement(); this.tooltip = $(new Element('span', {'class':'tooltip'})).append(new Element('div', {'class':'tooltip-arrow'})).append(this.innerTooltip); this.tooltip.find("select").createSelect(); if(!Object.isArray(this.opt.data)){ this.opt.data = []; } if(this.opt.showEvent !== false){ this.bind(this.opt.showEvent, this.showTooltip.bind(this)); } if(this.opt.hideEvent !== false){ this.bind(this.opt.hideEvent, this.cancelClose.bind(this)); } this.addAllItems(); return this; }, createTitle: function(col){ if(this.opt.columns[col].title !== false){ this.titleRow.append(new Element('li', {'class':this.opt.columns[col].className}).insert(this.opt.columns[col].title)); } }, createRowItem: function(row){ var label,content; label = ''; switch(this.opt.rows[row].type){ case 'input': content = ''; break; case 'content': content = this.opt.rows[row].content.gsub('{fieldName}',this.opt.fieldName).gsub('{name}',row); break; } this.addItemRow += ''; }, filterVal: function(col, val){ if(typeof this.opt.columns[col].filter == 'function'){ return this.opt.columns[col].filter(val); } return val; }, showTooltip: function(){ var pos = {},parentParagraph,pleft; $('.tooltip').remove(); $('body').append(this.tooltip); this.tooltip.hide(); parentParagraph = $(this).parents('p').size() > 0 ? $(this).parents('p').eq(0) : $(this).parents('div.form'); offset = this.offset(); pos.left = (offset.left+(this.realWidth()/2))-(this.tooltip.realWidth()/2); pos.top = offset.top+this.realHeight()+5; if(parentParagraph.size() > 0){ pleft = parentParagraph.offset().left; pright = pleft+parentParagraph.realWidth()+24; if(pos.left pright){ pos.left = pright-this.tooltip.realWidth()-34; $('.tooltip-arrow').addClass('right').css({'left':(offset.left-pos.left)+(this.realWidth()/2)-10}); } else { $('.tooltip-arrow').removeClass('left').removeClass('right') } } this.tooltip.css({'top':pos.top+"px", 'left':pos.left+"px"}); this.saveBtn.unbind('click').bind("click",this.saveData.bind(this)); this.cancelBtn.unbind('click').bind("click",this.cancelClose.bind(this)); this.tooltip.fadeIn('slow', function () { this.onshowfunc(); this.tooltip.find('select').createSelect(); }.bind(this)); }, removeItem: function(e){ var el = $(e.currentTarget),id; id = el.identify().gsub(this.opt.fieldName+'_', ''); this.opt.data = this.opt.data.without(this.opt.data[id]); this.items.empty(); this.addAllItems(); this.tooltip.find('.remove-item').bind('click', this.removeItem.bind(this)); }, addAllItems: function(){ if(Object.isArray(this.opt.data) && this.opt.data.size() > 0){ this.opt.data.each(function(data, i){ var row=$(new Element('ul', {'class':'list-table'})); this.columnList.each(function(col){ var val = !Object.isUndefined(data[col]) ? data[col] != "" ? data[col] : ' ' : ' '; customClass = val != ' ' ? ' '+col+'-custom-'+val : 0; val = this.filterVal(col, val); val.length > 135 ? customClass+=' overflow' : 0; if (col !== 'removeItem' && col !== 'addBtn') { // for geysers if (col == 'isSolar' || col == 'geyserOutside') { var options = $(this.opt.columns[col].content).find('option'); options.each(function (i,v) { o = $(v); if (o.val() != '' && o.val() == val) { val = o.text(); } }); } $('#'+col).val(''); row.append(new Element('li', {'class':this.opt.columns[col].className+customClass}).insert({'bottom':val})); } else if(col === 'removeItem'){ row.append(new Element('li', {'class':this.opt.columns[col].className}) .insert({'bottom':this.opt.columns[col].content.gsub('{fieldName}',this.opt.fieldName).gsub('{key}',i)})); } }.bind(this)); this.items.append(row); }.bind(this)) } }, checkEmptyValues: function(){ var values = this.addValues.getCurrentValues(),ret=false; Object.keys(values).each(function(key){ if(values[key] != ""){ ret = true } }); return ret; }, saveData: function(e){ e.preventDefault(); e.stopPropagation(); var canClose = false; if ($('#model').size() > 0) { if (parseInt($('#model :selected').val()) > 0) { canClose = true; } } if(canClose !== false){ this.opt.onsave(this.opt.data, this.identify()); this.closeTooltip(); //log(this.identify()); $('#'+this.identify()).blur(); } else { $.alert('Please select your make, model group, year and model.'); } }, cancelClose: function(e){ e.preventDefault(); e.stopPropagation(); this.closeTooltip(); this.opt.oncancel(this.opt.data, this.identify()); }, closeTooltip: function(){ this.tooltip.find('.add-item').unbind('click'); this.tooltip.find('.remove-item').unbind('click'); this.cancelBtn.unbind('click'); this.saveBtn.unbind('click'); this.tooltip.remove(); }, isEmptyFunction: function(func){ if(Object.isFunction(func)){ return func.toString() === "function () { }"; } else { return true; } }});// TO BE MERGED INTO COMMON.JS FOR PRODUCTION/** * This is a clientside Fields "Database". It contains indexed fielddata for the current * pages form along with predefined functions to manipulate and retrieve the data quickly * and easily. */var $FD;var MiFields = Class.create((function(){function initialize(array) {this._object = {};array.each(function(obj, i){this._object[i] = obj;}.bind(this));// this._index = {};updateIndex.apply(this);// this._each(function(f){// if(typeof f.obj == 'object'){// this._index[f.obj.fieldId] = f.key;// this._index[f.obj.fieldName] = f.key;// }// }.bind(this));window.$FD = function(id){return this.getField(id);}.bind(this);}function updateIndex(){var index = {},dfix=[];this._each(function(d){var pdata={},f=d.obj,i=d.key,parentFields,pc;index[f.fieldId] = i;index[f.fieldName] = i;if(f.parentFields !== null && !Object.isUndefined(f.parentFields)){parentFields = Object.keys(f.parentFields);// console.log(parentFields);pc = parentFields.size();if(pc > 0){dfix.push(i);parentFields.each(function(parent){if(typeof index[parent+"_dependents"] == 'undefined')index[parent+"_dependents"] = [];index[parent+"_dependents"].push(f.fieldId);});}}}); dfix.each(function(i){var p,f = this._object[i],parentFields;parentFields = Object.keys(f.parentFields);//parentFields.size() > 1 ? console.log(f) : 0;parentFields.each(function(parent){//console.log(parent);parentFieldName = this._object[index[parent]].fieldName;if(typeof index[parentFieldName+"_dependents"] == 'undefined')index[parentFieldName+"_dependents"] = [];index[parentFieldName+"_dependents"].push(f.fieldName);this._object[i].dependsOnField = parentFieldName;}.bind(this))}.bind(this));this._index = index;this.initialized = true;}function _each(iterator) {for (var key in this._object) {var obj = this._object[key], pair = [key, obj];pair.key = key;pair.obj = obj;iterator(pair);}}function getFieldKey(s){if(Object.isString(s)){if(s.match('field_')){s = s.gsub('field_', '');}}return this._index[s];}function setValue(s, key, value){s = this.getFieldKey(s); if (key == 'displayName') { value = escape(value); } if (key == 'tiaValue') { value = escape(value); }return this._object[s][key] = value;}function resetFieldSaveValues(s){s = this.getFieldKey(s);this._object[s]['displayValue'] = '';this._object[s]['tiaValue'] = '';$('.active', $('#field_'+this._object[s]['fieldId']).parents('.field')).removeClass('active');$('#field_'+this._object[s]['fieldId']).val('');}function setFieldVal(s, tia, display){ //log(s);log(tia);log(display);s = this.getFieldKey(s); //log(s);if (typeof display == 'undefined') { if (typeof this._object[s]['displayValue'] != 'undefined' && this._object[s]['displayValue'] != '') { display = this._object[s]['displayValue']; } else { display = tia; } } if (!Object.isUndefined(this._object[s])) { this._object[s]['displayValue'] = escape(display); this._object[s]['tiaValue'] = (typeof tia == 'string') ? escape(tia) : tia; }return this._object[s];}function getValue(s, key) {s = this.getFieldKey(s); return this._object[s][key];}function getFieldById(s) {return this.getField(s);}function getFieldByName(s) {return this.getField(s);}function getFieldDependencies(s){return this._index[s+'_dependents'];} function getField(s) { var field = this._object[(this.getFieldKey(s))];if(typeof field === 'object' && !Object.isUndefined(field.tiaValue) && !Object.isUndefined(field.displayValue)){field = Object.extend(field, {tiaValue:Object.isString(field.tiaValue) ? unescape(field.tiaValue) : field.tiaValue,displayValue:unescape(field.displayValue)});}return field; }function storyText(fieldId, fieldValue){var fieldObj = this.getField(fieldId), storyText = false, story_text = false;//log(fieldObj);if (!Object.isUndefined(fieldObj)) {if (!Object.isUndefined(fieldObj.storyText)) {if (!Object.isUndefined(fieldObj.storyText[strId])) {storyText = unescape(fieldObj.storyText[strId][fieldValue])}} //log(storyText);if (!storyText) {story_text = fieldObj.story_text_for_field; //log(story_text);if (story_text != null && !Object.isUndefined(story_text)) {storyText = unescape(story_text[fieldValue]/*.base64_decode()*/)} else { //log(fieldObj.fieldValues); //log(fieldValue);if(fieldObj.fieldValues != null){if(Object.isArray(fieldObj.fieldValues.array)){fieldObj.fieldValues.array.each(function(val){if(val.valueId == fieldValue){storyText = val.displayName;}});}}}}return storyText;}return fieldObj;}function extractData(filter){var data = {};this._each(function(f){// if (f.obj.fieldName == 'previouslosses') {// log('1');// log(f.obj.displayValue);// log(f.obj.tiaValue);// log(escape(unescape(f.obj.displayValue)));// } //if ($('#field_' + f.obj.fieldId + ':not(.dep-hidden)').size() > 0) {typeof f.obj.displayValue == 'undefined' ? f.obj.displayValue = '' : 0;typeof f.obj.tiaValue == 'undefined' ? f.obj.tiaValue = '' : 0;//if (f.obj.fieldName == 'previouslosses') {// log('2');// log(f.obj.displayValue);// log(f.obj.tiaValue);// log(typeof f.obj.tiaValue);// log(f.obj.tiaValue != "");//}if (f.obj.displayValue != "" && f.obj.tiaValue !== "" ) {if(Object.isArray(filter)){if(filter.hasVal(f.obj.fieldName) || filter.hasVal(""+f.obj.fieldId)){data[f.obj.fieldName] = {displayValue: escape(unescape(f.obj.displayValue)),tiaValue: (typeof f.obj.tiaValue == 'string') ? escape(unescape(f.obj.tiaValue)) : f.obj.tiaValue}}} else {data[f.obj.fieldName] = {displayValue: escape(unescape(f.obj.displayValue)),tiaValue: (typeof f.obj.tiaValue == 'string') ? escape(unescape(f.obj.tiaValue)) : f.obj.tiaValue}}} else if(f.obj.fieldName.match('password') && $('input[name="'+f.obj.fieldName+'"]').val() != ""){data[f.obj.fieldName] = {displayValue: $('input[name="'+f.obj.fieldName+'"]').val(),tiaValue: $('input[name="'+f.obj.fieldName+'"]').val()}} // }}); //log(data['previouslosses']);return data;}function getQueryString(){return Object.toQueryString(this.extractData());}function getPercentComplete(){var completed=0,total=0;this._each(function(f){if(!Object.isUndefined(f.obj.tiaValue)){if(f.obj.tiaValue != "")completed = completed+1;}total = total+1;});return Math.round((completed/total)*100);}return {initialize: initialize,_each: _each,getFieldKey:getFieldKey,setValue:setValue,setFieldVal:setFieldVal,resetFieldSaveValues:resetFieldSaveValues,getValue:getValue,getField:getField,getFieldById:getFieldById,getFieldByName:getFieldByName,getFieldDependencies:getFieldDependencies,storyText:storyText,extractData:extractData,getQueryString:getQueryString,getPercentComplete:getPercentComplete};})());if(typeof fieldData != 'undefined'){var FieldData = new MiFields(fieldData);//fieldData = false;//delete fieldData;};MiApplication.addMethods({ updateServer: function(e) { var fieldId,el,value; el = $(e.target); fieldId = el.attr('name'); value = this.formValues.getCurrentValues()[fieldId]; if (Object.isUndefined(value)) { try { value = el.val(); } catch (err) { } } if (Object.isUndefined(value)) { try { value = $FD(fieldId).tiaValue; } catch (err) { } } if ($('input[name="'+fieldId+'"]').hasClass('check_insured_value')) { value = value.replace(/\s/, ''); } if (!Object.isUndefined(el.attr('placeholder')) && value == el.attr('placeholder')) { value = ''; } if(!el.hasClass('noupdate')){ FieldData.setFieldVal(fieldId, value); } el.valid && el.valid(); }});// buildingNo: "string",// postalCode: "string",// boxStreet: "string",// area: "string",// buildingName: "string",// suburb: "string",// streetNumber: "string",// streetName: "string",// longitude: "decimal",// latitude: "decimal"var MiForm, dev_test;window.product_id = 'WHEEL';$(document).ready(function() { new Image().src = '/images/ajax-loader-snake.gif'; $('.app-form-callback-cta').unbind('click').click(function (e) { e.preventDefault(); var el = $(this), formCont = $('#'+el.data('form')), callbackCont = $('#'+el.data('callback')), pluginId = el.data('form').gsub('form', ''); if (formCont.is(':visible')) { formCont.css('min-height', formCont.realHeight()); callbackCont.css('min-height', formCont.realHeight()); formCont.fadeOut('fast', function () { callbackCont.fadeIn('fast', function () { formCont.css('min-height', ''); callbackCont.css('min-height', ''); }); }); Miway.Tracking.pixelTrack(312994); try { callbackCont.find('form#callbackForm1020').data('obj').validate(); } catch (err) { } } else { formCont.css('min-height', formCont.realHeight()); callbackCont.css('min-height', formCont.realHeight()); callbackCont.fadeOut('fast', function () { formCont.fadeIn('fast', function () { formCont.css('min-height', ''); callbackCont.css('min-height', ''); }); }); //el.find('a').text('Request a callback!'); } });;MiForm = new MiApplication({ formValuesSelect: '#miwayForm1020_container', helpTimeout:300, app_id:0, product_id:'WHEEL', miwy_fa:'get_initial_quote', miwy_np:'101', cur_step:0, validationSelect: '#miwayForm1020', formSubmitBtn: $('#miwayForm1020 .form_submit'),getFormData:function(){ $('#miwayForm1020 input, #miwayForm1020 select').each(function () { $(this).fire('blur'); }); var postObj={ miwy_fa:this.opt.miwy_fa, app_id:this.opt.app_id, productId:this.opt.product_id, miwy_np:this.opt.miwy_np, noValidate: parseInt($('input[name="noValidate"]').val()), data:Object.toJSON(FieldData.extractData()) } return Object.toQueryString(postObj); },onInit: function(){ // tracking "started" on first field focus $('#miwayForm1020').find('input, select').not('[type="hidden"]').focus(function () { if ($(this).parents('form').data('started') != true) { trackPageview('/gagoal/started-WHEEL-insurance'); $(this).parents('form').data('started', true); } });this.addressFields = $(".address, .fulladdress"); if(this.addressFields.size() > 0){ this.addressFields.each(function(i){ this.createAddrAutocomplete(this.addressFields[i]); }.bind(this)); } this.vehicleSearch = $("input[name='make_model']"); if(this.vehicleSearch.size() > 0){ this.createVehicleAutocomplete(this.vehicleSearch); } if ($(".datepicker").size() > 0) { $(".datepicker").datepicker({ dateFormat: "yy-mm-dd", changeMonth:true, changeYear:true }); } $(".hidden").parents('div.field').hide(); $('#miwayForm1020').find('input:not(:checkbox), select').blur(this.updateServer.bind(this)); $('#miwayForm1020').find('input:checkbox').change(this.updateServer.bind(this));$('#miwayForm1020').find('select').createSelect({colMax:1,limiton:'columns', optionsClass: 'custom-car', colWidth: 210});clearTimeout(this.helpTimer);$('#miwayForm1020').find('input, select').focus(this.resetHelpTimer.bind(this));// $('form.validate input.auto_alt_toggle').setDefaultValue(); this.bindSubmit(); $('#miwayForm1020').find('input, select').not('[type="checkbox"]').blur(function () { $(this).parents('div.field').find('div.question').trigger('mouseleave'); }); $('#miwayForm1020').find('input, select').not('[type="checkbox"]').focus(function () { $(this).parents('div.field').find('div.question').trigger('mouseover'); });}});});*SpeedQuote
The quoted premium will only be illustrative and not a binding offer.
Tidak ada komentar:
Posting Komentar