  // add in google analytics
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21528310-2']);
  _gaq.push(['_trackPageview']);

$(function() {
	// add the menu and footer html
	var shtml='<a href="#" onclick="switchMenu(1);" class="logo">viningsdentistry.com</a>';
  shtml+='<table><tr><td>';
  shtml+='<a href="http://www.facebook.com/ViningsCenterForDentistry?sk=app_190322544333196" class="facebook">Facebook</a>';
  shtml+='<a href="http://www.kudzu.com/m/Vinings-Center-for-Dentistry-1390023/reviews/" class="kudzu">Kudzu</a>';
  shtml+='<a href="http://twitter.com/ViningsCtr4Dent" class="twitter">Twitter</a>';
  shtml+='</td></tr>';
  shtml+='<tr><td align="middle"><a href="tel:17704449393" class="phonenum">770-444-9393</a></td></tr></table>';
  if (cur_menu != 'content1'){
		shtml+='<div class="clearfix"></div>';
		shtml+='<ul class="submenu clearfix">';
		shtml+='<li class="mnitem2"><a href="#" onclick="switchMenu(3);">Our Practice</a></li>';
		shtml+='<li class="mnitem3"><a href="#" onclick="switchMenu(4);">Our Team</a></li>';
		shtml+='<li class="mnitem1"><a href="#" onclick="switchMenu(2);">Our Services</a></li>';
		shtml+='<li class="mnitem5"><a href="#" onclick="switchMenu(7);">Video Education</a></li>';
		shtml+='<li class="mnitem4"><a href="#" onclick="switchMenu(5);">Contact Us</a></li>';
		shtml+='</ul><br/><div id="fb-root"></div>';
  }
	$('#wrapper_head').html(shtml);
	shtml='<style>.fb_edge_widget_with_comment {vertical-align: text-bottom;}</style><a href="https://twitter.com/share" class="twitter-share-button" data-via="ViningsCtr4Dent">Tweet</a>&nbsp;<div class="plus_hold"><g:plusone size="medium" annotation="none"></g:plusone></div>&nbsp;<fb:like href="http://www.viningsdentistry.com/" send="true" layout="button_count" width="115" show_faces="true" font="arial"></fb:like>';
	shtml+='<div class="footer_holder">';
  shtml+='<div class="acreditations">';
  shtml+='<a href="http://www.aacd.com" target="_blank"><img src="images/aacd.png" alt="American Academy of Cosmetic Dentistry" title="American Academy of Cosmetic Dentistry"></a>';
  shtml+='<a href="http://www.gadental.org/" target="_blank"><img src="images/gda.png" alt="Georgia Dental Association" title="Georgia Dental Association"></a>';
  shtml+='<a href="http://www.ada.org/" target="_blank"><img src="images/ada.png" alt="American Dental Association" title="American Dental Association"></a>';
  shtml+='<a href="http://www.agd.org/" target="_blank"><img src="images/agd.png" alt="Academy of General Dentistry" title="Academy of General Dentistry"></a>';
  shtml+='</div></div>';
  shtml+='3621 Vinings Slope - Suite 4350 - Atlanta, Georgia 30339<br/>';
  shtml+='Phone: <a href="tel:7704449393" title="Call for an appointment today">770.444.9393</a>&nbsp;&nbsp;&nbsp;Fax: 770.226.0404&nbsp;&nbsp;&nbsp;E-Mail: <a href="mailto:info@viningsdentistry.com" title="Send us an E-Mail today">info@viningsdentistry.com</a><br/>';
  now=new Date();
  year=now.getFullYear();
  shtml+='&copy;&nbsp;'+year+'&nbsp;Vinings Center for Dentistry, All rights reserved<br/>';
  shtml+='<a title="View our Privacy Statement" href="#" onclick="switchMenu(6);">Privacy Statement</a><br/>';
  shtml+='Vinings Center for Dentistry provides family and cosmetic dental services to Vinings, Smyrna, Marietta, Austell, Powder Springs, Buckhead, Sandy Springs and surrounding Atlanta <a href="links.html" target="_blank" class="nosh">Georgia</a>.';
  shtml+='<br/>Serving Zip Codes: 30060, 30061, 30062, 30064, 30066, 30067, 30068, 30075, 30080, 30082, 30101, 30126, 30127, 30144, 30152, 30327,and 30339';
	$('#wrapper_bot').html(shtml);

	// add main menu hover effects
	$("#menu").delegate("li a", "mouseover mouseout", function(e) {
		if (e.type == 'mouseover') {
		$("#menu li a").not(this).parent().dequeue().animate({opacity: "0.2"}, 300);
		} else {
		$("#menu li a").not(this).parent().dequeue().animate({opacity: "1"}, 300);
		}
	});
	
  // add in google analytics
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

  // add in google plus
	var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
	po.src = 'https://apis.google.com/js/plusone.js';
	s.parentNode.insertBefore(po, s);

  // add facebook stuff
  $('html').attr('xmlns:fb','http://ogp.me/ns/fb#');
  (function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));
  
  // add twitter share code
  !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");

});

function switchMenu(cid){

 var sid='#'+cur_menu;
 $(sid).fadeOut("slow", function(){
 	 if (cid==1){
 		 location.href="index.html";
 	 }else if (cid==2){
 		 location.href="services.html";
 	 }else if (cid==3){
 		 location.href="practice.html";
 	 }else if (cid==4){
 		 location.href="team.html";
 	 }else if (cid==5){
 		 location.href="contact.html";
 	 }else if (cid==6){
 		 location.href="privacy.html";
 	 }else if (cid==7){
 		 location.href="video.html";
 	 }
 });

}	


