﻿ /*try{Typekit.load();}catch(e){}
 
 var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-18737431-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    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);
  })();



function tooltip(target_items, name){
 $(".popup").each(function(i){
		$("body").append("<div class='"+name+"' id='"+name+i+"'><img src='Images/ToolTipLeft.png' style=float:left;'><p style='float:left;'>"+$(this).attr('title')+"</p><img src='Images/ToolTipRight.png' style=float:left;'></div><div class='ClearBoth'>"); 
	
		var my_tooltip = $("#"+name+i);
		
		$(this).removeAttr("title").mouseover(function()
		{
			my_tooltip.css({display:"none"}).fadeIn(50);
		}).mousemove(function(kmouse){
				my_tooltip.css({left:kmouse.pageX-5, top:kmouse.pageY-55});
		}).mouseout(function()
		{
				my_tooltip.fadeOut(50);				  
		});
	});
}

$(document).ready(function() {
tooltip("a","ToolTip");
	//Nav Listeners
	$("#Logo").click(function () {
		if($('#NavWork').hasClass('current')) {
			$("#PgWork").hide("blind", { direction: "vertical" }, 500, ShowHome);
			$('#NavWork').removeClass('current');
			$('#Logo').addClass('current');
		} 
		else if($('#NavContact').hasClass('current')) {
			$("#PgContact").hide("blind", { direction: "vertical" }, 500, ShowHome);
			$('#NavContact').removeClass('current');
			$('#Logo').addClass('current');
		} 
	});
	$("#NavWork").click(function () {
		if($('#Logo').hasClass('current')) {
			$("#PgHome").hide("blind", { direction: "vertical" }, 500, ShowWork);
			$('#Logo').removeClass('current');
			$('#NavWork').addClass('current');
		} 
		else if($('#NavContact').hasClass('current')) {
			$("#PgContact").hide("blind", { direction: "vertical" }, 500, ShowWork);
			$('#NavContact').removeClass('current');
			$('#NavWork').addClass('current');
		} 
	});
	$("#NavWork2").click(function () {
		if($('#Logo').hasClass('current')) {
			$("#PgHome").hide("blind", { direction: "vertical" }, 500, ShowWork);
			$('#Logo').removeClass('current');
			$('#NavWork').addClass('current');
		} 
		else if($('#NavContact').hasClass('current')) {
			$("#PgContact").hide("blind", { direction: "vertical" }, 500, ShowWork);
			$('#NavContact').removeClass('current');
			$('#NavWork').addClass('current');
		} 
	});
	$("#NavContact").click(function () {
		if($('#Logo').hasClass('current')) {
			$("#PgHome").hide("blind", { direction: "vertical" }, 500, ShowContact);
			$('#Logo').removeClass('current');
			$('#NavContact').addClass('current');
		} 
		else if($('#NavWork').hasClass('current')) {
			$("#PgWork").hide("blind", { direction: "vertical" }, 500, ShowContact);
			$('#NavWork').removeClass('current');
			$('#NavContact').addClass('current');
		} 
	});
	
	//Work Listeners
	$("#WorkHellfish").click(function () {
		HideStuff('#WorkList','#WorkDetailHellfish');
	});
	$("#WorkInstantLiquidFacelift").click(function () {
		HideStuff('#WorkList','#WorkDetailInstantLiquidFacelift');
	});
	$("#WorkMixtapeHype").click(function () {
		HideStuff('#WorkList','#WorkDetailMixtapeHype');
	});
	$("#WorkAiPx").click(function () {
		HideStuff('#WorkList','#WorkDetailAiPx');
	});
	$("#WorkVDSCrmLogin").click(function () {
		HideStuff('#WorkList','#WorkDetailVDSCrmLogin');
	});
	$("#WorkAiWaSeventeenAd").click(function () {
		HideStuff('#WorkList','#WorkDetailAiWaSeventeenAd');
	});
	$("#WorkFoodNetworkCookingClasses").click(function () {
		HideStuff('#WorkList','#WorkDetailFoodNetworkCookingClasses');
	});
	$("#WorkAiHwEco").click(function () {
		HideStuff('#WorkList','#WorkDetailAiHwEco');
	});
	$("#WorkVDSCrm").click(function () {
		HideStuff('#WorkList','#WorkDetailVDSCrm');
	});
	
	//Back Listeners
	$("#BackHellfish").click(function () {
		HideStuff('#WorkDetailHellfish','#WorkList');
	});
	$("#BackInstantLiquidFacelift").click(function () {
		HideStuff('#WorkDetailInstantLiquidFacelift','#WorkList');
	});
	$("#BackMixtapeHype").click(function () {
		HideStuff('#WorkDetailMixtapeHype','#WorkList');
	});
	$("#BackAiPx").click(function () {
		HideStuff('#WorkDetailAiPx','#WorkList');
	});
	$("#BackVDSCrmLogin").click(function () {
		HideStuff('#WorkDetailVDSCrmLogin','#WorkList');
	});
	$("#BackAiWaSeventeenAd").click(function () {
		HideStuff('#WorkDetailAiWaSeventeenAd','#WorkList');
	});
	$("#BackFoodNetworkCookingClasses").click(function () {
		HideStuff('#WorkDetailFoodNetworkCookingClasses','#WorkList');
	});
	$("#BackAiHwEco").click(function () {
		HideStuff('#WorkDetailAiHwEco','#WorkList');
	});
	$("#BackVDSCrm").click(function () {
		HideStuff('#WorkDetailVDSCrm','#WorkList');
	});
	
	
	//Show Functions
	function HideStuff(hideId, showId)
	{
		$(hideId).hide("blind",{direction:"vertical"},500,ShowStuff(showId));
	}
	function ShowStuff(showId)
	{
		$(showId).show("blind",{direction:"vertical"},500);
	}
	function ShowWork(){$("#PgWork").show("blind", { direction: "vertical"},500);}
	function ShowContact(){$("#PgContact").show("blind", { direction: "vertical" }, 500);}
	function ShowHome(){$("#PgHome").show("blind", { direction: "vertical" }, 500);}

	$("form").submit(function(){
	   var str = $("form").serialize();
	   $.ajax({type:"POST",url:"form.php",data: str,success: function(msg){ 
	$("#note").ajaxComplete(function(event, request, settings){
	if(msg == 'OK')
		{$("#FormCon").hide("blind", 800);
		$("#CCFormTy").show("blind", 800);
		}else{
		var result = msg;}	
			$(this).html(result);
		
		});
		}
	 });
	return false;
	});
});*/
//TxtName Functions
function TxtNameFocus(){
var x=document.getElementById("TxtName")
	if (x.value == "*שם מלא"){
	x.value = "";	
	}
}
function TxtNameBlur(){
var x=document.getElementById("TxtName")
	if (x.value == ""){
	x.value = "*שם מלא";	
	}
}
//TxtEmail Functions
function TxtEmailFocus(){
var x=document.getElementById("TxtEmail")
	if (x.value == "דואר אלקטרוני"){
	x.value = "";	
	}
}
function TxtEmailBlur(){
var x=document.getElementById("TxtEmail")
	if (x.value == ""){
	x.value = "דואר אלקטרוני";	
	}
}
//TxtPhone Functions
function TxtPhoneFocus(){
var x=document.getElementById("TxtPhone")
	if (x.value == "*טלפון"){
	x.value = "";	
	}
}
function TxtPhoneBlur(){
var x=document.getElementById("TxtPhone")
	if (x.value == ""){
	x.value = "*טלפון";	
	}
}
//TxtDetails Functions
function TxtDetailsFocus(){
var x=document.getElementById("TxtDetails")
	if (x.value == "הערות"){
	x.value = "";	
	}
}
function TxtDetailsBlur(){
var x=document.getElementById("TxtDetails")
	if (x.value == ""){
	x.value = "הערות";	
	}
}
