/* 
 generated 2010-03-08 05:35:06 Etc/GMT as defined in /var/onCourse/1105/custom/defaults/config/js.conf
*/
jQuery.fn.quickSearch=function(A,B){return this.each(function(){var I=3;var D=$j(this);var K=$j(".quicksearch-wrap");var G=this;var E=-1;updatedFunction=function(){J();$j(".suburb-choice").each(function(){$j(this).bind("click",updateFunction)})};loadFunction=function(M,N,L){E=-1;K.load(M,N,L)};updateFunction=function H(N){var L=null;if(N&&(L=N.srcElement)){var O=[];$j(".suburb-choice:checked").each(function(){var P=$j(this);var Q=P.attr("value");O.push(Q)});D.addClass("throbber");var M=D.val();loadFunction(A,{text:M,suburb:O},updatedFunction)}};matchesFunction=function C(L){if(!L||L.length<I){F();return }D.addClass("throbber");loadFunction(A,{text:L},updatedFunction)};function J(){D.removeClass("throbber");$j("div.advanced-search-button").hide();hideAdvancedSearch();K.removeShadow();K.slideDown("slow",function(){K.dropShadow()});$j(document).bind("mousedown.quicksearch",function(L){if($j(L.target).parents("div.quicksearch-wrap").length==0&&L.target!=G){F()
}})}function F(){E=-1;allItems=null;D.removeClass("throbber");K.removeShadow();$j(document).unbind("mousedown.quicksearch");K.slideUp(400);$j("div.advanced-search-button").show()}D.keyup(function(L){if(L.which==27){F();return false}$j("#adv_keyword").val($j(this).attr("value"));oldIndex=E;allItems=K.children("ul").children("li").not(".title");selectedItem=null;if(allItems.size()>0){if(E>=0){selectedItem=allItems.eq(E)}if(L.which==13){if(selectedItem==null){$j("form#search").submit();return true}else{window.location=selectedItem.children("a").attr("href");L.preventDefault();return false}}if(allItems.size()==1&&(L.which==40||L.which==9||L.which==38)){E=0}else{if(L.which==40||L.which==9){if(E>=(allItems.size()-1)){E=0}else{E++}}if(L.which==38){if(E<=0){E=allItems.size()-1}else{E--}}if(E!=oldIndex){if(selectedItem!=null){selectedItem.removeClass("selected")}allItems.eq(E).addClass("selected")}}return false}return true});D.delayedObserver(function(){matchesFunction(D.val())},1)})};jQuery.fn.hideQuickSearch=function(A,B){return this.each(function(){this.hide()
})};var $j=jQuery.noConflict();$j(document).ready(function(){$j("#addstudent").click(function(){$j("#addstudent-block").slideToggle(400)});$j("fieldset#student_enrol_credentials input,fieldset#student_enrol_details input").keydown(function(O){if(O.keyCode==13&&$j(this).attr("class").indexOf("suburb-autocomplete")==-1){$j("#add-student-enrol").click()}});$j(".toggler").live("click",function(){$j(this).toggleClass("clicked");$j(this).toggleClass("toggler-expanded");$j(this).nextAll(".post-collapse:first").slideToggle(400);$j(this).nextAll(".collapse:first").slideToggle(400)});$j(".class_details").live("mouseover",function(){$j(this).children(".bubbleInfo").show()});$j(".class_details").live("mouseout",function(){$j(this).children(".bubbleInfo").hide()});$j(".more-classes-link").click(function(){$j(this).hide();$j(this).nextAll(".more-classes").slideToggle(400)});$j(".other-classes-control").click(function(){$j(this).hide();$j(this).nextAll(".other-classes").slideToggle(400)});$j("span.clear-search a").hover(function(){$j(".search-criteria").addClass("clearing-search")
},function(){$j(".search-criteria").removeClass("clearing-search")});$j("#toggle-results-map").click(function(){$j("#focus-map").slideToggle(400);$j(this).toggleClass("clicked");loaded=$j(this).attr("loaded");if(!loaded){$j(this).attr({loaded:true});mapLoadForID("mapDelayed")}return false});$j(".reason",".hint").toggleClass("hidden-text");$j("span.valid input").bind("focus blur",function(){$j(this).next().children(".hint").toggleClass("hidden-text")});$j("span.validate input").bind("focus blur",function(){$j(this).next().children(".reason").toggleClass("hidden-text")});$j("#iscompany").click(function(){$j(this).nextAll(".company-details:first").slideToggle(400);$j(this).nextAll(".user-details:first").slideToggle(400)});if($j("#datepicker")){$j("#datepicker").datepicker()}try{if($j("#map").length){mapLoad()}}catch(K){}if(document.getElementById("dirmap")){dirLoad()}$j("li.class_addorder a").live("click",function(){var O=this.id.match(/(\d+)/)[1];$j.ajax({type:"GET",url:AppBaseURL+"/wa/Refresh/refresh?addShortlist="+O,success:function(P){$j("#shortlist").replaceWith(P);
$j.ajax({type:"GET",url:AppBaseURL+"/wa/Refresh/courseClass?id1="+O+"&x=ShortlistControl",success:function(Q){$j("#m"+O).replaceWith(Q);$j(".nyromodaliframe").nyroModal({type:"iframe"})}})}});return false});$j("li.onshortlist a.cutitem").live("click",function(){var O=this.id.match(/(\d+)/)[1];$j(this).parent("li:first").css({"background-color":"666666"}).hide("drop",{direction:"up"},300,function(){$j.ajax({type:"GET",url:AppBaseURL+"/wa/Refresh/refresh?cutShortlist="+O,success:function(P){$j("#shortlist").replaceWith(P);$j.ajax({type:"GET",url:AppBaseURL+"/wa/Refresh/courseClass?id1="+O+"&x=ShortlistControl",success:function(Q){$j("#m"+O).replaceWith(Q);$j(".nyromodaliframe").nyroModal({type:"iframe"})}})}})});return false});$j("li.shortlisted a").live("click",function(){var O=this.id.match(/(\d+)/)[1];$j("#shortlist a#x"+O).parent("li:first").css({"background-color":"666666"}).hide("drop",{direction:"up"},300,function(){$j(this).hide("slide",{direction:"down"},300);$j.ajax({type:"GET",url:AppBaseURL+"/wa/Refresh/refresh?cutShortlist="+O,success:function(P){$j("#shortlist").replaceWith(P);
$j.ajax({type:"GET",url:AppBaseURL+"/wa/Refresh/courseClass?id1="+O+"&x=ShortlistControl",success:function(Q){$j("#m"+O).replaceWith(Q);$j(".nyromodaliframe").nyroModal({type:"iframe"})}})}})});return false});if($j(".suburb-autocomplete")){var F="/advanced/suburbs";$j(".suburb-autocomplete").autocomplete(F,{mustMatch:false,matchContains:true,autoFill:false,scrollHeight:220,selectFirst:false})}$j(".suburb-autocomplete").result(function(O,Q,P){if(P&&P.length>0){setPostcodeAndStateFromSuburb($j(this).attr("id"),"postcode","state")}});$j(".suburb-autocomplete").keydown(function(O){if(O.which==13){O.preventDefault();return false}});$j(".defaultText").focus(function(O){if($j(this).val()==$j(this).attr("default")){$j(this).removeClass("defaultTextActive");$j(this).val("")}});$j(".defaultText").blur(function(){if($j(this).val()==""){$j(this).addClass("defaultTextActive");$j(this).val($j(this).attr("default"))}});$j(".defaultText").blur();$j("form").submit(function(){clearDefaultValues();return true
});$j(".search-terms,.show-advanced-search,div#advanced-search-background").click(function(){toggleAdvancedSearch()});$j("#cancel-search").click(function(){toggleAdvancedSearch()});$j("#adv_keyword").keyup(function(O){text=$j(this).val();$j("form#search > input[type=text]").val(text);if(O.keyCode==13){$j("form#search2").submit()}});if($j("input.quicksearch")){$j("input.quicksearch").quickSearch("/advanced/keyword")}var N=1;var M=2;var D=3;var E=4;var L=5;var H=6;var A=7;var J=8;var B=9;var C=10;var I=11;var G=12;$j.each([N,M,D,E,L,H,A,J,B,C,I,G],function(O,P){$j(".match-"+P).mouseover(function(){$j(".match-"+P).addClass("search-highlight")});$j(".match-"+P).mouseout(function(){$j(".match-"+P).removeClass("search-highlight")})});$j("#weekday-parent").click(function(){$j("#weekdays INPUT[type='checkbox']").attr("checked",$j("#weekday-parent").is(":checked"))});$j("#weekdays :checkbox").change(function(){if(!$j(":checkbox:checked").length){}else{if($j("#weekdays :checkbox:not(:checked)").length){$j("#weekday-parent").attr("checked",false)
}else{$j("#weekday-parent").attr("checked",true)}}});$j("#weekend-parent").click(function(){$j("#weekend INPUT[type='checkbox']").attr("checked",$j("#weekend-parent").is(":checked"))});$j("#weekend :checkbox").change(function(){if(!$j(":checkbox:checked").length){}else{if($j("#weekend :checkbox:not(:checked)").length){$j("#weekend-parent").attr("checked",false)}else{$j("#weekend-parent").attr("checked",true)}}});$j("a.timeline").click(function(O){displayTimeline(this);return false});$j("#overlay").click(function(O){$("overlay").hide();$("timeline-wrap").style.visibility="hidden";return false});$j("#submitTellAFriendLink").live("click",function(){submitTellAFriend();return false});$j("#course_detail .detail_for_class").each(function(O){elem=$j(this);if(elem.height()>50){var P=elem.attr("id");elem.before('<div class="show_more_class_info" style="clear:both;" id=x'+P+'><a href="javascript:void();"  >more</a></div>');$j("#x"+P).live("click",function(){$j("#"+P).show();this.hide()});elem.hide()
}else{this.show()}});$j(".tooltip").tooltip({top:0,track:true,delay:0,showURL:false,showBody:" - ",fade:250});$j(".nyromodal").nyroModal({debug:false});$j(".nyromodaliframe").nyroModal({type:"iframe"});$j(".nyromodalreload").nyroModal({type:"iframe",endRemove:function(){window.location.reload(true)}});$j(".collapsedLocationMap").hide();$j(".showLocationMap").click(function(){$j(".showLocationMap").hide();$j("#location").show();return false})});function submitTellAFriend(){var E=$j("input#code").val();var B=$j("input#sendername").val();var A=$j("input#senderemail").val();var G=$j("input#friendname").val();var F=$j("input#friendemail").val();var D=$j("#message").val();var C="sendername="+B+"&senderemail="+A+"&code="+E+"&friendname="+G+"&friendemail="+F+"&source=ajax";if(D){C+="&message="+D}$j.ajax({type:"POST",url:"/tellAFriend",data:C,error:function(H,J,I){},success:function(H){$j("#popup-content").html(H)}})}function displayTimeline(G){var E=G.href;var I=String(G.getAttribute("rel"));var J=String(G.getAttribute("timeZone"));
hideSelectBoxes();hideFlash();var C=getPageSize();$("overlay").style.width=C[0]+"px";$("overlay").style.height=C[1]+"px";var D=getPageScroll();var H=10;$("timeline-wrap").style.top=(D[1]+(H*4))+"px";$("timeline-wrap").style.bottom="0px";$("timeline-wrap").style.margin="0px 0pt 0pt -375px";new Effect.Appear("overlay",{duration:0.2,from:0,to:0.4,afterFinish:function(){$("timeline-wrap").style.visibility="visible"}});var F=new Date();var B=new Timeline.DefaultEventSource(E);if(I=="session"){bandInfos=[Timeline.createBandInfo({timeZone:J,date:F,width:"20%",intervalUnit:Timeline.DateTime.DAY,intervalPixels:100,eventSource:B}),Timeline.createBandInfo({timeZone:J,date:F,width:"40%",intervalUnit:Timeline.DateTime.MONTH,intervalPixels:200,eventSource:B})]}if(I=="class"){bandInfos=[Timeline.createBandInfo({timeZone:J,date:F,width:"60%",intervalUnit:Timeline.DateTime.MONTH,intervalPixels:100,eventSource:B}),Timeline.createBandInfo({timeZone:J,date:F,width:"40%",intervalUnit:Timeline.DateTime.YEAR,intervalPixels:200,eventSource:B})]
}bandInfos[1].syncWith=0;bandInfos[1].highlight=true;tl=Timeline.create($("timeline"),bandInfos);tl.loadXML(E,function(L,K){B.loadXML(L,K);tl.getBand(0).setCenterVisibleDate(B.getEarliestDate())});if(I=="session"){var A="#sessions_for_class_"+E.substring(E.indexOf("?ids=")+5);$j("#timeline").append('<div class="timeline_stuffer" style="height:240px;"/>&nbsp;</div><div class="sessions_in_timeline" style="overflow:scroll; margin-left:30px; height:150px;">'+$j(A).html()+"</div>")}return false}function showSelectBoxes(){var A=document.getElementsByTagName("select");for(i=0;i!=A.length;i++){A[i].style.visibility="visible"}}function hideSelectBoxes(){var A=document.getElementsByTagName("select");for(i=0;i!=A.length;i++){A[i].style.visibility="hidden"}}function showFlash(){var B=document.getElementsByTagName("object");for(i=0;i<B.length;i++){B[i].style.visibility="visible"}var A=document.getElementsByTagName("embed");for(i=0;i<A.length;i++){A[i].style.visibility="visible"}}function hideFlash(){var B=document.getElementsByTagName("object");
for(i=0;i<B.length;i++){B[i].style.visibility="hidden"}var A=document.getElementsByTagName("embed");for(i=0;i<A.length;i++){A[i].style.visibility="hidden"}}function getPageScroll(){var B,A;if(self.pageYOffset){A=self.pageYOffset;B=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){A=document.documentElement.scrollTop;B=document.documentElement.scrollLeft}else{if(document.body){A=document.body.scrollTop;B=document.body.scrollLeft}}}arrayPageScroll=new Array(B,A);return arrayPageScroll}function getPageSize(){var C,A;if(window.innerHeight&&window.scrollMaxY){C=window.innerWidth+window.scrollMaxX;A=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){C=document.body.scrollWidth;A=document.body.scrollHeight}else{C=document.body.offsetWidth;A=document.body.offsetHeight}}var B,D;if(self.innerHeight){if(document.documentElement.clientWidth){B=document.documentElement.clientWidth}else{B=self.innerWidth}D=self.innerHeight
}else{if(document.documentElement&&document.documentElement.clientHeight){B=document.documentElement.clientWidth;D=document.documentElement.clientHeight}else{if(document.body){B=document.body.clientWidth;D=document.body.clientHeight}}}if(A<D){pageHeight=D}else{pageHeight=A}if(C<B){pageWidth=C}else{pageWidth=B}arrayPageSize=new Array(pageWidth,pageHeight,B,D);return arrayPageSize}function drawGIcon(R,S,L,K,O,M,E,C,H,J,P,I,G,B,A,F,D){var Q=null;Q=new GIcon();Q.image=M;Q.shadow=E;Q.iconSize=new GSize(C,H);Q.shadowSize=new GSize(J,P);Q.iconAnchor=new GPoint(I,G);Q.infoWindowAnchor=new GPoint(B,A);var N=new GLatLng(L,K);marker=new GMarker(N,{icon:Q,title:S});marker.title=S;marker.suburb=F;marker.url=D;R.addOverlay(marker);return marker}function mapLoad(){mapLoadForID("map")}function mapLoadForID(B){if($j("#"+B).length&&GBrowserIsCompatible()&&window.map==null){window.map=new GMap2(document.getElementById(B));window.map.setCenter(new GLatLng(vLatitude,vLongitude),16);window.map.addControl(new GMapTypeControl());
window.map.addControl(new GSmallMapControl());if(window.showNearMarker){var A=drawGIcon(window.map,"Near",vLatitude,vLongitude,null,"/s/img/box-blue-star.png","/s/img/box-shadow.png",35,35,52,35,6,30,10,5,window.near);window.showNearMarker=false}else{if(vLatitude!=0&&vLongitude!=0){drawGIcon(window.map,"Site",vLatitude,vLongitude,null,"/s/img/marker1.png","/s/img/marker-shadow1.png",20,34,36,34,10,34,10,5)}}if(window.showMapItems){window.map.enableInfoWindow();GEvent.addListener(window.map,"click",function(C){if(C){window.map.openInfoWindowHtml(C.getLatLng(),infoWindowContent(C))}});$j.getJSON("/advanced/mapitems",function(C){if(C){var D=false;bestBounds=new GLatLngBounds();otherBounds=new GLatLngBounds();if(vLatitude!=0&&vLongitude!=0){bestBounds.extend(new GLatLng(vLatitude,vLongitude));otherBounds.extend(new GLatLng(vLatitude,vLongitude))}for(i=0;i<C.items.length;i++){m=C.items[i];id="id"+m.id;window.siteMarkers[id]=drawGIcon(map,m.title,m.latitude,m.longitude,m.focusMatch,m.imageSrc,m.shadowSrc,m.iconWidth,m.iconHeight,m.shadowWidth,m.shadowHeight,m.anchorx,m.anchory,m.infoWindowx,m.infoWindowy,m.suburb,m.url);
otherBounds.extend(new GLatLng(m.latitude,m.longitude));if(m.focusMatch==1){D=true;bestBounds.extend(new GLatLng(m.latitude,m.longitude))}}bounds=D?bestBounds:otherBounds;zoom=window.map.getBoundsZoomLevel(bounds);window.map.setCenter(bounds.getCenter(),zoom);if(window.siteIDtoShow!=null){showSiteOnMap(window.siteIDtoShow);window.siteIDtoShow=null}}})}}}function dirLoad(){dirLoader("dirmap","dirtxt")}function dirLoader(A,C){var E=null;var D;var B=null;if(GBrowserIsCompatible()){mapControl=document.getElementById("displayDirectionsMap");if(A&&document.getElementById(A)){document.getElementById(A).innerHTML=""}if(A&&document.getElementById(A)&&(mapControl==null||mapControl.value)){dmap=document.getElementById(A);dmap.removeClassName("mapCollapsed");dmap.addClassName("mapExpanded");B=new GMap2(dmap);B.setCenter(new GLatLng(vLatitude,vLongitude),12);B.addControl(new GMapTypeControl());B.addControl(new GSmallMapControl())}if(C&&document.getElementById(C)){document.getElementById(C).innerHTML="";
var F=new GDirections(B,document.getElementById(C));F.load("from: "+$F("from")+" to: "+vSiteAddress)}}}function dirLoad(){var C=null;var B;dirmap=document.getElementById("dirmap");if(!dirmap){dirmap=document.getElementById("dirmapDelayed")}if(dirmap&&GBrowserIsCompatible()){dirmap.removeClassName("mapCollapsed");dirmap.addClassName("mapExpanded");var A=new GMap2(dirmap);A.setCenter(new GLatLng(vLatitude,vLongitude),12);A.addControl(new GMapTypeControl());A.addControl(new GSmallMapControl());document.getElementById("dirtxt").innerHTML="";var D=new GDirections(A,document.getElementById("dirtxt"));D.load("from: "+$F("from")+" to: "+vSiteAddress)}}function showSiteOnMap(A){$j("#focus-map").show();$j("body").animate({scrollTop:0},"slow");if(window.map==null){window.siteIDtoShow=A;mapLoadForID("mapDelayed")}else{id="id"+A;marker=window.siteMarkers[id];if(marker){window.map.openInfoWindowHtml(marker.getLatLng(),infoWindowContent(marker))}else{}}}function infoWindowContent(A){s="<h4>"+A.title+"</h4><h5>"+A.suburb+"</h5>";
if(A.url!=null){s+='<p><a href="'+A.url+'">Information and directions</a></p>'}return s}function getCookie(C){var D=document.cookie.indexOf(C+"=");var A=D+C.length+1;if((!D)&&(C!=document.cookie.substring(0,C.length))){return null}if(D==-1){return null}var B=document.cookie.indexOf(";",A);if(B==-1){B=document.cookie.length}return unescape(document.cookie.substring(A,B))}function setCookie(C,E,A,H,D,G){var B=new Date();B.setTime(B.getTime());if(A){A=A*1000*60*60*24}var F=new Date(B.getTime()+(A));document.cookie=C+"="+escape(E)+((A)?";expires="+F.toGMTString():"")+((H)?";path="+H:"")+((D)?";domain="+D:"")+((G)?";secure":"")}function deleteCookie(A,C,B){if(getCookie(A)){document.cookie=A+"="+((C)?";path="+C:"")+((B)?";domain="+B:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}function insertImage(B,E,D,A,C){ins='{image id:"'+E+'" alt:"'+D+'" width:"'+A+'" height:"'+C+'"}';el=$(B);if(el.setSelectionRange){el.value=el.value.substring(0,el.selectionStart)+"\n"+ins+"\n"+el.value.substring(el.selectionEnd,el.value.length)
}else{el.value=el.value+"\n"+ins}}function totalPrice(){$j("form#enrolmentform input:not(:checked)").each(function(C){var D=$j(this).parent().attr("id").substring(1);$j("td#p"+D).addClass("price-crossed")});var A=0;var B=0;$j("form#enrolmentform input:checked").each(function(C){var E=$j(this).parent().attr("id").substring(1);var D=$j("td#p"+E).removeClass("price-crossed");B+=parseFloat($j("#d"+E).text());A+=parseFloat(D.children(".fee-discounted").text().substring(1))});$j("#discounttotal").text(makeMoney(B));$j("#total").text(makeMoney(A));$j("#cardtotalstring").text(makeMoney(A))}function makeMoney(A){var C=A.toString().split(".");var B=C.length==1?"00":(C[1].length==1?C[1]+"0":C[1].substring(0,2));return"$"+C[0]+"."+B}jQuery.fn.clearForm=function(){return this.each(function(){var B=this.type,A=this.tagName.toLowerCase();if(A=="form"){return $j(":input",this).clearForm()}if(B=="text"||B=="password"||A=="textarea"){this.value=""}else{if(B=="checkbox"||B=="radio"){this.checked=false}else{if(A=="select"){this.selectedIndex=-1
}}}})};$j.fn.ClearTypeFadeTo=function(A){if(A){$j(this).show().each(function(){if(jQuery.browser.msie){$j(this).attr("oBgColor",$j(this).css("background-color"))}}).fadeTo(A.speed,A.opacity,function(){if(jQuery.browser.msie){if(A.opacity==0||A.opacity==1){$j(this).css({"background-color":$j(this).attr("oBgColor")}).removeAttr("oBgColor");$j(this).get(0).style.removeAttribute("filter")}}if(A.callback!=undefined){A.callback()}})}};$j.fn.ClearTypeFadeIn=function(A){if(A){$j(this).css({opacity:0}).ClearTypeFadeTo({speed:A.speed,opacity:1,callback:A.callback})}};$j.fn.ClearTypeFadeOut=function(A){if(A){$j(this).css({opacity:1}).ClearTypeFadeTo({speed:A.speed,opacity:0,callback:A.callback})}};function toggleAdvancedSearch(){if($j("#advanced_search").is(":visible")){hideAdvancedSearch()}else{showAdvancedSearch()}}function showAdvancedSearch(){$j("a.show-advanced-search").css("background","transparent url(/s/img/bg_advsearchbox.png)");$j("a.show-advanced-search").css("border-color",$j("div#advanced_search").css("border-left-color"));
$j("a.show-advanced-search").css("border-style","solid");$j("a.show-advanced-search").css("border-width","1px 1px 0 1px");$j("a.show-advanced-search span").addClass("adv_search_active");$j("a.show-advanced-search span").css("background","transparent url(/s/img/arrow_up.png) no-repeat 100%").text("Fewer options");$j("form#search").ClearTypeFadeTo({speed:450,opacity:0.4});$j("div#content").ClearTypeFadeTo({speed:450,opacity:0.4});$j("#advanced_search").show("slow",function(){});$j(document).bind("mousedown",function(A){if(!$j(A.target).is("#advanced_search_container *")&&!$j(A.target).is("div.ac_results *")){hideAdvancedSearch()}})}function hideAdvancedSearch(){$j(document).unbind("mousedown");$j("form#search").ClearTypeFadeTo({speed:450,opacity:1});$j("div#content").ClearTypeFadeTo({speed:450,opacity:1});$j("#advanced_search").hide("slow");$j("a.show-advanced-search").css("background","");$j("a.show-advanced-search").css("border","none");$j("a.show-advanced-search span").removeClass("adv_search_active");
$j("a.show-advanced-search span").css("background","transparent url(/s/img/arrow_down.png) no-repeat 100%").text("More options")}function clearAdvancedSearch(){$j("#search2").clearForm()}function clearDefaultValues(){$j(".defaultText").each(function(A){if($j(this).val()==$j(this).attr("default")){$j(this).val("")}})}function suburbFromString(A){postcodeLength=4;if(A.length>=postcodeLength){postcode=parseInt(A.substring(A.length-postcodeLength,A.length));if(postcode){return jQuery.trim(A.substring(0,A.length-postcodeLength))}}return A}function postcodeFromString(A){postcodeLength=4;if(A.length>=postcodeLength){postcode=parseInt(A.substring(A.length-postcodeLength,A.length));if(postcode){return""+postcode}}return""}function stateFromPostcode(A){if(A.length<4){return""}p=parseInt(A);if(p==null){return""}if(p>=100&&p<=2599){return"NSW"}if(p>=2619&&p<=2898){return"NSW"}if(p>=2921&&p<=2999){return"NSW"}if(p>=200&&p<=299){return"ACT"}if(p>=2600&&p<=2618){return"ACT"}if(p>=2900&&p<=2920){return"ACT"
}if(p>=3000&&p<=3999){return"VIC"}if(p>=8000&&p<=8999){return"VIC"}if(p>=4000&&p<=4999){return"QLD"}if(p>=9000&&p<=9999){return"QLD"}if(p>=5000&&p<=5999){return"SA"}if(p>=6000&&p<=6999){return"WA"}if(p>=7000&&p<=7999){return"TAS"}if(p>=800&&p<=999){return"NT"}return""}function setPostcodeAndStateFromSuburb(D,G,F){if(D&&$j("#"+D).length>0){var C=$j("#"+D).val();var A=suburbFromString(C);var B=postcodeFromString(C);var E=B.length==0?"":stateFromPostcode(B);if(A.length>0){if(G&&B.length>0&&$j("#"+G).length>0){$j("#"+G).val(B);$j("#"+D).val(A)}if(F&&E.length>0&&$j("#"+F).length>0){$j("#"+F).val(E)}}}return false}function editWebContentWithCKEditor(A){CKEDITOR.config.toolbar_Full=[["PasteText","PasteFromWord","-","SpellChecker","Scayt"],["Undo","Redo","-","Find","Replace","-","RemoveFormat"],["Bold","Italic","Underline","Strike","-","Subscript","Superscript"],["Templates","-","Source"],"/",["NumberedList","BulletedList","-","Outdent","Indent","Blockquote"],["Link","Unlink","Anchor"],["Image","Table","HorizontalRule","Smiley","SpecialChar","PageBreak"],["Styles","Format","ShowBlocks"]];
CKEDITOR.replace(A)};