function mihMail(){
//document.loginpage.btnSubmit1.click();
var daReferrer = document.referrer;
var email = "info@mih.com.au";
//var errorMsg = "here here here is the error error error error";
var subject = "Make It Happen - Website Inquiry";
var body_message = "";
body_message+="Company:"+"%0D%0A";
body_message+="Contact Name:"+"%0D%0A";
body_message+="Contact Phone:"+"%0D%0A";
body_message+="Contact Email:"+"%0D%0A";
body_message+="How can we help you?"+"%0D%0A";
//alert(body_message);
var mailto_link = 'mailto:'+email+'?subject='+subject+'&body='+body_message;
win = window.open(mailto_link,'emailWindow');
if (win && win.open &&!win.closed) win.close();
}

// JavaScript Document
function linkTwitter(){
	window.open('http://twitter.com/MakeItHappenAU')	
}

function linkLinkD(){
	window.open('http://www.linkedin.com/companies/602352')	
}

function linkFaceBook(){
	window.open('http://www.facebook.com/pages/edit/?id=116588108375843#!/pages/Make-It-Happen/116588108375843?v=wall')	
}

function linkGoogle(){
	window.open('http://maps.google.com.au/maps?f=q&source=s_q&hl=en&geocode=&q=suite+2,+22+narabang+way+belrose&sll=-25.335448,135.745076&sspn=52.14633,114.169922&ie=UTF8&hq=&hnear=2%2F22+Narabang+Way,+Belrose+New+South+Wales+2085&ll=-33.706848,151.214876&spn=0.024098,0.055747&z=15')	
}

function linkBookmark(){
	window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;
}

function showEbook(idValue){
	var ebookId = idValue.split("_");
	//alert(ebookId[1])
	for(i=1; i<=4; i++){
		if(i==ebookId[1]){
			$('.ebook'+i+'_content').show("slow");			
		} else {
			$('.ebook'+i+'_content').hide();
		}
	}	
}

function showPDF(idValue){
	var ebookId = idValue.split("_");
	//alert(ebookId[1])
	for(i=1; i<=4; i++){
		if(i==ebookId[1]){
			$('.pdf'+i+'_content').show("slow");			
		} else {
			$('.pdf'+i+'_content').hide();
		}
	}	
}

function changeSubTitle(img_name,img_src) {
		document[img_name].src=img_src;
	}

/* For Menu */
function initMenu() {
  $('#menu ul').hide();
 
  $('#menu li a').click(
    function() {
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
        }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#menu ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
        }
      }
    );
  }
	function changeSubTitle(img_name,img_src) {
		document[img_name].src=img_src;
	}
	
	function changeTextColor(text_name,text_color) {
		document.getElementById(text_name).style.color=text_color;
	}
	
	
	function changeImage(img_name) {
		if(img_name=='aboutUs') {
			document['aboutUs'].src='images/menu_about_us_on.png';
			document['whatWeDo'].src='images/menu_what_we_do.png';
			document['enablers'].src='images/menu_enablers.png';
			document['gettingStarted'].src='images/menu_getting_started.png';
			document['portfolio'].src='images/menu_portfolio.png';
			document['contact'].src='images/menu_contact.png';
		} else if(img_name=='whatWeDo') {
			document['aboutUs'].src='images/menu_about_us.png';
			document['whatWeDo'].src='images/menu_what_we_do_on.png';
			document['enablers'].src='images/menu_enablers.png';
			document['gettingStarted'].src='images/menu_getting_started.png';
			document['portfolio'].src='images/menu_portfolio.png';
			document['contact'].src='images/menu_contact.png';
		} else if(img_name=='enablers') {
			document['aboutUs'].src='images/menu_about_us.png';
			document['whatWeDo'].src='images/menu_what_we_do.png';
			document['enablers'].src='images/menu_enablers_on.png';
			document['gettingStarted'].src='images/menu_getting_started.png';
			document['portfolio'].src='images/menu_portfolio.png';
			document['contact'].src='images/menu_contact.png';
		} else if(img_name=='gettingStarted') {
			document['aboutUs'].src='images/menu_about_us.png';
			document['whatWeDo'].src='images/menu_what_we_do.png';
			document['enablers'].src='images/menu_enablers.png';
			document['gettingStarted'].src='images/menu_getting_started_on.png';
			document['portfolio'].src='images/menu_portfolio.png';
			document['contact'].src='images/menu_contact.png';
		} else if(img_name=='portfolio') {
			document['aboutUs'].src='images/menu_about_us.png';
			document['whatWeDo'].src='images/menu_what_we_do.png';
			document['enablers'].src='images/menu_enablers.png';
			document['gettingStarted'].src='images/menu_getting_started.png';
			document['portfolio'].src='images/menu_portfolio_on.png';
			document['contact'].src='images/menu_contact.png';
		} else if(img_name=='contact') {
			document['aboutUs'].src='images/menu_about_us.png';
			document['whatWeDo'].src='images/menu_what_we_do.png';
			document['enablers'].src='images/menu_enablers.png';
			document['gettingStarted'].src='images/menu_getting_started.png';
			document['portfolio'].src='images/menu_portfolio.png';
			document['contact'].src='images/menu_contact_on.png';
		}
	}
	
function changeImage1(img_name) {
		if(img_name=='market_awareness') {
			document['market_awareness'].src='images/market_awareness_on.png';
			document['customer_acquisition'].src='images/customer_acquisition.png';
			document['customer_retention'].src='images/customer_retention.png';
			document['channel_marketing'].src='images/channel_marketing.png';
		} else if(img_name=='customer_acquisition') {
			document['market_awareness'].src='images/market_awareness.png';
			document['customer_acquisition'].src='images/customer_acquisition_on.png';
			document['customer_retention'].src='images/customer_retention.png';
			document['channel_marketing'].src='images/channel_marketing.png';
		} else if(img_name=='customer_retention') {
			document['market_awareness'].src='images/market_awareness.png';
			document['customer_acquisition'].src='images/customer_acquisition.png';
			document['customer_retention'].src='images/customer_retention_on.png';
			document['channel_marketing'].src='images/channel_marketing.png';
		} else if(img_name=='channel_marketing') {
			document['market_awareness'].src='images/market_awareness.png';
			document['customer_acquisition'].src='images/customer_acquisition.png';
			document['customer_retention'].src='images/customer_retention.png';
			document['channel_marketing'].src='images/channel_marketing_on.png';
		}
}

function changeTextColor1(text_name) {
		if(text_name=="market_awareness"){
		document.getElementById("market_awareness").style.color="#000000";
		document.getElementById("customer_acquisition").style.color="#b7b7b7b";
		document.getElementById("customer_retention").style.color="#b7b7b7b";
		document.getElementById("channel_marketing").style.color="#b7b7b7b";
		} else if(text_name=="customer_acquisition"){
		document.getElementById("market_awareness").style.color="#b7b7b7b";
		document.getElementById("customer_acquisition").style.color="#000000";
		document.getElementById("customer_retention").style.color="#b7b7b7b";
		document.getElementById("channel_marketing").style.color="#b7b7b7b";
		} else if(text_name=="customer_retention"){
		document.getElementById("market_awareness").style.color="#b7b7b7b";
		document.getElementById("customer_acquisition").style.color="#b7b7b7b";
		document.getElementById("customer_retention").style.color="#000000";
		document.getElementById("channel_marketing").style.color="#b7b7b7b";
		} else if(text_name=="channel_marketing"){
		document.getElementById("market_awareness").style.color="#b7b7b7b";
		document.getElementById("customer_acquisition").style.color="#b7b7b7b";
		document.getElementById("customer_retention").style.color="#b7b7b7b";
		document.getElementById("channel_marketing").style.color="#000000";
		}
	}
	
/* Popup Bubble */	

$(document).ready(function(){ 
	$(".popups a").hover(function() {
	$(this).next(".our_people").stop(true, true).animate({opacity: "show", top: "40", left: "70"}, "slow");
	}, function() {
	$(this).next(".our_people").animate({opacity: "hide", top: "40"}, "fast");
	});   
}); 

$(document).ready(function(){ 
	$(".popups a").hover(function() {
	$(this).next(".campaign_tracker").stop(true, true).animate({opacity: "show", top: "-5", left: "100"}, "slow");
	}, function() {
	$(this).next(".campaign_tracker").animate({opacity: "hide", top: "-5"}, "fast");
	});   
}); 

$(document).ready(function(){ 
	$(".popups a").hover(function() {
	$(this).next(".contact_popup").stop(true, true).animate({opacity: "show", top: "0", left: "150"}, "slow");
	}, function() {
	$(this).next(".contact_popup").animate({opacity: "hide", top: "0"}, "fast");
	});   
});
 
$(document).ready(function(){ 
	$(".popups a").hover(function() {
	$(this).next(".bubble_test").stop(true, true).animate({opacity: "show", top: "0", left: "40"}, "slow");
	}, function() {
	$(this).next(".bubble_test").animate({opacity: "hide", top: "0"}, "fast");
	});   
}); 


function showHide(idValue){
	var $list = $('.bullet3 li');
	//alert($list.length)
	for(var i=1; i<=$list.length; i++){
		$("#pdf_"+i).removeClass("on");
		$("#pdf_"+i+"_1").hide();	
		$("#pdf_"+i+"_2").hide();	
		$("#pdf_"+i+"_3").hide();	
	}
	var idValueHold = idValue;
	$("#"+idValueHold).addClass("on");
	$("#"+idValueHold+"_1").show('slow');
	$("#"+idValueHold+"_2").show('slow');
	$("#"+idValueHold+"_3").show('slow');	
	
}	


