

jQuery(document).ready(function(){			

jQuery("#continuebtn").click(function(){
			var zip = jQuery("#zipcode").val();
			if( zip.length >= 5){
				jQuery("#zipcode").css("background","#fff");
			var iframetext = "<p>Please use zoom controls and map type selection features to toggle map placements and viewing options. Click an icon below for a link to that office's website.<br/><br/> <img src='images/icons/house.png' /> This icon  represents your location. The others represent our offices.</p><iframe width=\"600\" height=\"500\" style=\"margin:0 auto; border:1px solid #613789; \"  scrolling=\"no\" src=\"map.asp?zip=" + zip +  "\"> </iframe><a class='close' href='#'>Return to American Family Orthodontics</a>";
			jQuery("#mapplace").show("slow", function(){
													  jQuery("#mapplace").html(iframetext)
													  jQuery("#mapplace a.close").click(function(){
																	jQuery("#mapplace").html("").hide("slow");
																});
													  });						  
									  
									   }else{jQuery("#zipcode").css("background","#fcc");}
									  });
									 

});

function runSiteScripts() {
	
//here's the sIfr
var copperplate = { src: 'copperplate.swf' };
sIFR.activate(copperplate);
sIFR.replace(copperplate, {
  selector: '#namecolumn h2',
    wmode: 'transparent', 
  css: '.sIFR-root {color:#613789; text-decoration:underline; text-align:right;}'
});
sIFR.replace(copperplate, {
  selector: '#addresscolumn h2',
    wmode: 'transparent', 
  css: '.sIFR-root {color:#613789; text-decoration:underline;}'
});
sIFR.replace(copperplate, {
  selector: '#namecolumn h3',
    wmode: 'transparent', 
  css: '.sIFR-root {color:#613789; text-decoration:none; text-align:right;} .sIFR-root a{color:#613789; text-decoration:none; cursor:pointer;} .sIFR-root a:hover{color:#000; text-decoration:underline;}'
});

sIFR.replace(copperplate, {
  selector: '#addresscolumn h3',
    wmode: 'transparent', 
  css: '.sIFR-root {color:#613789; text-decoration:none; text-align:left;} .sIFR-root a{color:#613789; text-decoration:none; cursor:pointer;} .sIFR-root a:hover{color:#000; text-decoration:underline;}'
});
sIFR.replace(copperplate, {
  selector: '#contentcolumn h3',
    wmode: 'transparent', 
  css: '.sIFR-root {color:#613789; text-align:left;}'
});
sIFR.replace(copperplate, {
  selector: 'h1',
    wmode: 'transparent', 
  css: '.sIFR-root {color:#613789;}'
});

// gets rid of focus box on click
if(document.getElementsByTagName) {
var a = document.getElementsByTagName("a");
//collect all anchors A
for(var i = 0; i < a.length; i++){
// mouse onfocus, blur anchors
a[i].onfocus = function(){this.blur();};
}
}


}
