$(document).ready(function(){$("#utility .wai a").focus(function(){$(this).parent().removeClass("wai")
}).click(function(){$("h2:eq(0)").attr("tabIndex",-1).focus()
});
$("#nav-primary .login a").click(function(){showDropMenu($("#login-menu"),"login",$(this).offset(),"btn-loginmenu");
return false
});
$("#cta .contact").click(function(){showDropMenu($("#contact-menu"),"cta",$(this).offset(),"btn-contactmenu");
return false
});
$("#btn-applyonlinefor").click(function(){showDropMenu($("#menu-applyonline"),"applyonline",$(this).offset(),"btn-applyonlinefor");
return false
});
$("#btn-mediareleases").click(function(){showDropMenu($("#menu-mediareleases"),"mediareleases",$(this).offset(),"btn-mediareleases");
return false
});
$(document).click(function(Q){if(document.getElementById("active-menu")){removeDropMenu()
}});
$("#search-site input[type=text]").focus(function(){if(this.value==="I'm searching for..."){this.value=""
}$(this).toggleClass("focus")
}).blur(function(){if(this.value===""){this.value="I'm searching for..."
}$(this).toggleClass("focus")
});
if(navigator.userAgent.match("iPhone")==="iPhone"){$(".tel > a , a.tel").each(function(Q){$(this).attr("href","tel:"+$(this).text())
})
}$("#content-index").parent().toggleClass("tabbed");
$(".tabbed #content-primary .section:not(:eq(0))").addClass("hidden-section");
$("#content-index li:eq(0)").addClass("selected");
$("#content-index a").click(function(){var R=$("#content-index li.selected");
var Q=R.find("a").attr("href");
var S=$(this).attr("href");
$(this).parent().addClass("selected");
R.removeClass("selected");
$(Q).removeClass("display-section").addClass("hidden-section");
$(S).removeClass("hidden-section").addClass("display-section");
if($(this).parent().prev().length>0){$("#content-primary").addClass("expand");
$("#content-secondary").addClass("wai")
}else{$("#content-primary").removeClass("expand");
$("#content-secondary").removeClass("wai")
}return false
});
$("#taskbar .print, a.print").click(function(){window.print();
return false
});
$(window).load(function(){$(".should-popup, .should-popup-modless, .should-popup-help, \n            .should-popup-basic, .should-popup-pdf, .should-popup-600, .should-popup-700, .should-popup-video").each(function(){var V=$(this);
var Y=this.className;
var Z=/should-popup\S*\w*/;
var c=Y.match(Z)[0];
var X=new Date();
var Q="Westpac"+X.getTime();
var S="no",U="no",R="no",W="no",b=800;
var T=getScreenDimensions().sHeight-80;
switch(c){case"should-popup":V.attr("target","_blank").append('<i class="wai"> (Opens in new window)</i>');
break;
case"should-popup-modless":b=600;
T=800;
break;
case"should-popup-help":b=600;
T=800;
break;
case"should-popup-basic":b=800;
T=600;
U="yes";
break;
case"should-popup-pdf":b=800;
T=800;
break;
case"should-popup-600":b=600;
T=600;
U="yes";
break;
case"should-popup-700":b=700;
T=600;
U="yes";
break;
case"should-popup-video":b=500;
T=480;
W="yes";
V.attr("target","_blank").append('<i class="wai"> (Opens in new window)</i>');
break;
default:var a=c.toLowerCase().split("-")[2].split("x");
if(!isNaN(a[0])){if(isNaN(a[1])){b=a[0]
}else{b=a[0];
T=a[1]
}}break
}if(b==600){b=620
}V.click(function(d){openModless(V.attr("href"),Q,b,T,S,U,R,W);
d.preventDefault();
return false
}).append('<i class="wai"> (Opens in new window)</i>')
})
});
$("#main a.should-target-parent").click(function(R){R.preventDefault();
var Q=$(this).attr("href");
sendURLToParent(Q)
});
$("#taskbar .pdf").click(function(){openModless(this.href,"Westpac_pdf",800,800,"no","no","no","no");
return false
});
$("#main a.webcast, a.podcast, #content-primary a.pdf, #main a.flash, #main a.word, #main a.excel").click(function(Q){openModless(this.href,"Westpac_recource",800,646,"no","no","no");
return false
}).append('<i class="wai"> (Opens in new window)</i>');
$(".should-init-dbb").click(function(Q){var R=$("head meta[name='westpac:pagename']").attr("content");
var S=document.location;
setCookie("ddbT",R,1);
setCookie("ddbL",S,1)
});
$(".closebox").click(function(){window.opener="x";
self.close();
return false
});
$(".backtotop > a").click(function(){window.scroll(0,0)
});
$(".section-landing .features ul:last").addClass("last");
$("h2:first,h3:first,h4:first,h5:first,h6:first",".cms-content").addClass("first");
$("h2:last,h3:last,h4:last,h5:last,h6:last",".cms-content").addClass("last");
$(".cms-content table").each(function(){$(this).find("tr:first > *").each(function(Q){$(this).addClass("c"+(Q+1))
})
});
$(".cms-content table tr").find(":first").addClass("first").end().find(":last").addClass("last").end().hover(function(){$(this).addClass("over")
},function(){$(this).removeClass("over")
});
$(".cms-content table tbody").find("tr:first").addClass("start").end().find("tr:last").addClass("end").end().find("tr:odd").addClass("odd").end().find("tr:even").addClass("even");
$(".cms-content ul.featured li:first").addClass("first");
if(jQuery.browser.msie&&(jQuery.browser.version<7)){$("#product-navigator .category-name").hover(function(){$(this).addClass("over")
},function(){$(this).removeClass("over")
})
}var H=function(){var Q=0;
$(this).find(".compare > input").each(function(){if($(this).attr("checked")){Q++
}});
$(this).find(".compare-all").each(function(){if(Q>1){$(this).attr({alt:"Compare selected",src:"/furniture/ui_imgs/productnavigator_btn_compareselected.png"}).removeClass("disabled").removeAttr("disabled")
}else{$(this).attr({disabled:"disabled",alt:"Compare selected: disabled until at least 2 products are selected",src:"/furniture/ui_imgs/productnavigator_btn_compareselected_disabled.png"}).addClass("disabled")
}})
};
var D=function(Q){var R=false;
if($(this).attr("checked")){R=true
}else{R=false
}$(this).parents("form:eq(0)").find("input.select-all").each(function(){if(R){$(this).attr("checked",R)
}else{$(this).removeAttr("checked")
}});
$(this).parents("form:eq(0)").find(".compare > input").each(function(){$(this).attr("checked",R)
});
$(this).parents("form:eq(0)").each(H)
};
var M=function(Q){var S=true;
var R=0;
$(this).parents("form:eq(0)").find(".compare > input").each(function(){if(!$(this).attr("checked")){S=false
}else{R++
}});
$(this).parents("form:eq(0)").find("input.select-all").each(function(){if(S){$(this).attr("checked",S)
}else{$(this).removeAttr("checked")
}});
$(this).parents("form:eq(0)").find(".compare-all").each(function(){if(R>1){$(this).attr({alt:"Compare selected",src:"/furniture/ui_imgs/productnavigator_btn_compareselected.png"}).removeClass("disabled").removeAttr("disabled")
}else{$(this).attr({disabled:"disabled",alt:"Compare selected: disabled until at least 2 products are selected",src:"/furniture/ui_imgs/productnavigator_btn_compareselected_disabled.png"}).addClass("disabled")
}})
};
$("#product-navigator form").each(H);
$("#product-navigator form").each(M);
$("#product-navigator input.select-all").click(D);
$("#product-navigator .compare > input").click(M);
$(".product-aggregate form.productAggComp").each(H);
$(".product-aggregate form.productAggComp input.select-all").click(D);
$(".product-aggregate form.productAggComp .compare > input").click(M);
$(".product-aggregate form.productAggCatComp").each(H);
$(".product-aggregate form.productAggCatComp input.select-all").click(D);
$(".product-aggregate form.productAggCatComp .compare > input").click(M);
$("#product-navigator li.selected").parents(".category-item").addClass("opened");
if($("#product-navigator li.category-item").length==1){$("#product-navigator li.category-item").addClass("opened")
}if(jQuery.browser.safari){$("#product-navigator .product-category .category-item:not(.opened) form").slideUp(0)
}else{$("#product-navigator .product-category .category-item:not(.opened) form").westpacSlideClose(0).parent().removeClass("opened")
}$("#product-navigator .product-category .category-name").click(function(Q){Q.preventDefault();
if(jQuery.browser.safari){var S=$(this).parents(".category-item");
var R=500;
if(S.hasClass("opened")){S.find("form").slideUp(R,function(){S.removeClass("opened")
});
return false
}if($("#product-navigator .opened").length){$("#product-navigator .opened").find("form").slideUp(R,function(){$("#product-navigator .opened").removeClass("opened");
S.find("form").slideDown(R);
S.addClass("opened");
$.scrollTo(S,R*1.5)
})
}else{S.find("form").slideToggle(R);
S.toggleClass("opened")
}}else{var S=$(this).parents(".category-item");
var R=500;
if(S.hasClass("opened")){S.find("form").westpacSlideClose(R,function(){S.removeClass("opened")
});
return false
}if($("#product-navigator .opened").length){$("#product-navigator .opened").find("form").westpacSlideClose(R,function(){$("#product-navigator .opened").removeClass("opened");
S.find("form").westpacSlideOpen(R);
S.addClass("opened");
$.scrollTo(S,R*1.5)
})
}else{S.find("form").westpacSlideToggle(R);
S.toggleClass("opened")
}}return false
});
var A=100;
$(".should-toggle-table").each(function(){$(this).addClass("should-toggle-table"+(""+A).substring(1,3));
$(this).text("Hide comparison rates");
A++
});
A=100;
$(".collapsibleTable").each(function(){$(this).addClass("collapsibleTable"+(""+A).substring(1,3));
A++
});
if($(".rates-aggregate").length>0){for(xx=100;
xx<=(A);
xx++){var L=".should-toggle-table"+(""+xx).substring(1,3);
var P=".collapsibleTable"+(""+xx).substring(1,3);
$(L).text("Show comparison rates");
$(P).each(function(Q,R){R.style.display="none"
})
}}for(xx=100;
xx<=(A);
xx++){(function(){var Q=".should-toggle-table"+(""+xx).substring(1,3);
var R=".collapsibleTable"+(""+xx).substring(1,3);
$(Q).each(function(){$(this).click(function(S){S.preventDefault();
if($(this).text()=="Hide comparison rates"){$(this).text("Show comparison rates");
$(R).each(function(T,U){U.style.display="none"
})
}else{$(this).text("Hide comparison rates");
$(R).each(function(T,U){U.style.display=""
})
}})
})
})()
}if($(".footnotes").length>0&&$(".footnotes li").length>0){var I=$('<a class="should-toggle-footnotes" href="#"></a>').text("Close");
$(I).insertAfter(".footnotes");
$(".should-toggle-footnotes").click(function(){$(this).prev(".footnotes").slideToggle(200);
$(this).toggleClass("closed");
if($(this).text()=="Open"){$(this).text("Close");
$(this).prev(".footnotes").find("li:eq(0)").queue(function(){$(this).attr("tabIndex",-1);
$(this).focus();
$(this).dequeue()
})
}else{$(this).text("Open")
}return false
})
}if($("#cta").length===0){$("#header-sectional h1").addClass("expanded")
}if($("#cta ul").length===0){$("#cta").addClass("no-buttons")
}if(!$("head meta[name='westpac:dbb']").length){deleteCookie("ddbT");
deleteCookie("ddbL")
}else{var K=getCookie("ddbT");
var B=getCookie("ddbL");
if(K==null||K==""){K="previous page"
}if(B!=null&&B!=""){$("#header-sectional").append('<div id="dbb"><a href="'+B+'">Back to '+K+"</a></div>")
}}if(typeof promosQueue==="object"){try{var G=promosQueue.left.length;
var O=promosQueue.right.length;
var N=$("#content-primary .c1 .promo-primary");
var F=$("#content-primary .c2 .promo-primary");
setPromo(G,N,promosQueue.left[Math.floor(Math.random()*G)]);
setPromo(O,F,promosQueue.right[Math.floor(Math.random()*O)])
}catch(C){}}if(typeof promosQueueSectionLanding==="object"){try{var E=promosQueueSectionLanding.promo.length;
var J=$("#content-primary .r2 .promo-primary");
setPromo(E,J,promosQueueSectionLanding.promo[Math.floor(Math.random()*E)])
}catch(C){}}$("#error-heading").focus();
if(jQuery.browser.msie&&(jQuery.browser.version<8)){$("input").each(function(){var Q=$(this).attr("type");
$(this).addClass(Q)
})
}});
function openModless(E,F,C,K,I,J,G,B){var K=K||"800",C=C||"800",F=F||"NewWindow";
var H=H||"no",J=J||"no",G=G||"no";
var D=getScreenDimensions();
sFeatures="height="+K+"px,width="+C+"px";
sFeatures+=",left="+(D.sX-(C/2))+"px";
sFeatures+=",top="+(D.sY-(K/2))+"px";
sFeatures+=",toolbar="+I;
sFeatures+=",location="+J;
sFeatures+=",menubar="+G;
sFeatures+=",status="+B;
sFeatures+=",resizable=yes,scrollbars=yes,copyhistory=no";
var A=window.open(E,F,sFeatures,true);
A.focus()
}function getScreenDimensions(){var D=screen.availHeight;
var C=screen.availWidth;
var B=C/2;
var A=D/2;
return{sWidth:C,sHeight:D,sX:B,sY:A}
}function showDropMenu(B,A,C,E){$("#psearchSuggest").slideUp(30);
if(document.getElementById("active-menu")){removeDropMenu()
}if(!document.getElementById("active-menu")){var D=B.clone().attr("id","active-menu").addClass(A).css({top:C.top,left:C.left+1});
$(document.body).append(D);
D.slideDown(100).queue(function(){var F=$("#active-menu a");
F.each(function(G){$(this).keydown(function(H){traverseActiveMenu(H,G,E)
})
});
$("#active-menu a:first").append('<i class="wai">. or make another choice with arrow key or return to page with Tab.</i>').focus().addClass("focused hasFocus");
$(this).dequeue()
})
}$("#active-menu").find("ul").mousemove(function(){$("#active-menu a.focused").removeClass("focused")
}).end().mouseout(function(F){if(!$("#active-menu a.focused").length){$("#active-menu a.hasFocus").addClass("focused")
}});
if(jQuery.browser.msie&&(jQuery.browser.version<8)){$("#active-menu a").attr("hideFocus","true")
}}function traverseActiveMenu(B,D,C){var A=$("#active-menu a").length;
switch(B.which){case 9:removeDropMenu();
document.getElementById(C).focus();
B.preventDefault();
return false;
break;
case 40:if(D===(A-1)){}else{$("#active-menu a.focused").removeClass("focused hasFocus");
$("#active-menu a:eq("+(D+1)+")").focus().addClass("focused hasFocus")
}B.preventDefault();
return false;
break;
case 38:if(D===0){removeDropMenu();
document.getElementById(C).focus()
}else{$("#active-menu a.focused").removeClass("focused hasFocus");
$("#active-menu a:eq("+(D-1)+")").focus().addClass("focused hasFocus")
}return false;
break;
case 27:removeDropMenu();
document.getElementById(C).focus();
break;
default:break
}}function removeDropMenu(){$("#active-menu:visible").slideUp(30).queue(function(){$(this).remove()
})
}$(window).unload(function(){});
function setCookie(B,D,F,C){if(F){var A=new Date();
var E=F*24*60*60;
var H=E>0?E:0;
A.setTime(A.getTime()+E*1000);
var G="; expires="+A.toGMTString()+";Max-Age="+H
}else{var G=""
}if(C){document.cookie=B+"="+D+G+";domain="+C+"; path=/"
}else{document.cookie=B+"="+D+G+"; path=/"
}}function getCookie(E){var B=E+"=";
var D=document.cookie.split(";");
for(var A=0;
A<D.length;
A++){var C=D[A];
while(C.charAt(0)==" "){C=C.substring(1,C.length)
}if(C.indexOf(B)==0){return C.substring(B.length,C.length)
}}return null
}function deleteCookie(D){var B=document.domain;
var A=B.split(".");
var C=jQuery.grep(A,function(E){return jQuery.inArray(E,["co","nz","com","au"])==-1
});
jQuery.each(C,function(E){var F=A.slice(E).join(".");
setCookie(D,"",-3,F);
setCookie(D,"",-3,"."+F)
});
setCookie(D,"",-3)
}function setPromo(B,C,A){if(A){$("h2",C).remove();
$("p",C).remove();
$("a",C).attr({href:A.link});
$("a",C).addClass(A.linkclass);
$("img",C).attr({src:A.image,alt:A.alt})
}}function newEl(E,C,D){var B=document.createElement(E);
if(C!==null&&C!==undefined){for(var A in C){switch(A.toLowerCase()){case"classname"||"class":B.className=C[A];
break;
case"colspan":B.colSpan=C[A];
break;
case"rowspan":B.rowSpan=C[A];
break;
case"htmlfor"||"for":B.htmlFor=C[A];
break;
default:B.setAttribute(A,C[A])
}}}if(typeof D==="string"||typeof D==="object"){$(B).append(D)
}return B
}function sendURLToParent(A){if(window.opener&&!window.opener.closed){window.opener.location=A;
self.close()
}else{window.open(A);
self.close()
}}function applyBTNow(){var A="https://online.westpac.com.au/sso/sps/btsfl/saml11/login?SP_PROVIDER_ID=bt.sv.pvd&TARGET=https%3A%2F%2Fbtsfl.bt.com.au%2Finvestor%2Fsso%2F[application link]%3Baccountid%3D%3Bbanner%3Dpwt%3Blastsignin%3B&PROTOCOL=POST";
document.cookie="boundary="+A+";domain=.westpac.com.au;path=/";
window.location=A
}function getBTReferrer(){refText="&referrer=";
curURL=document.location.href;
refStart=curURL.indexOf(refText);
if(refStart!=-1){return document.referrer
}else{return refText+curURL
}}jQuery.fn.westpacSlideClose=function(B,A){var C=(B)?B:450;
this.css("overflow","hidden").animate({height:0},C,"swing",A);
return this
};
jQuery.fn.westpacSlideOpen=function(D,B){var A=(D)?D:350;
var C=0;
this.children().each(function(){$(this).css("display","block");
C+=$(this).outerHeight(true)
});
this.animate({height:C},A,"swing",B);
return this
};
jQuery.fn.westpacSlideToggle=function(D,B){var A=(D)?D:null;
var C=this;
if($(C).height()>0){$(C).westpacSlideClose(A,B)
}else{$(C).westpacSlideOpen(A,B)
}return this
};
window.onbeforeprint=replaceLogosBeforePrint;
window.onafterprint=replaceLogosAferPrint;
function replaceLogosBeforePrint(){if((jQuery.browser.msie)&&(jQuery.browser.version<7)){$("body").addClass("oldIE");
$("#logo-w").attr("src","/furniture/ui_imgs/logo_W_plain_redonwhite.png");
$("body").append('<img id="oldIEPrint" src="/furniture/ui_imgs/logo_westpac_hardcrop.png">')
}}function replaceLogosAferPrint(){if((jQuery.browser.msie)&&(jQuery.browser.version<7)){$("body").removeClass("oldIE");
$("#logo-w").attr("src","/furniture/ui_imgs/logo_W_8b_a.png");
$("#oldIEPrint").remove()
}}function uj_SubmitFormTransferOut(B,A){uj_setCookie("boundary",B,"","/","westpac.com.au");
window.location=A
}function uj_setCookie(A,C,G,F,B,E){var H=new Date();
H.setTime(H.getTime());
if(G){G=G*1000*60*60*24
}var D=new Date(H.getTime()+(G));
document.cookie=A+"="+escape(C)+((G)?";expires="+D.toGMTString():"")+((F)?";path="+F:"")+((B)?";domain="+B:"")+((E)?";secure":"")
};