$(document).ready(function() {
  $("#view_portfolio").colorbox({width:"80%", height:"80%", iframe:true});

  $("#row1 img[title]").tooltip('#demotip'); 

  $("#row2 img[title]").tooltip({
  tip:'#demotip_down',
  position:'bottom center'
  });

  $("#front_i1").click(function() {
    resetPage();
  });
  $("#front_i4").click(function() {
    fadeOutAll(this.id);
  });
  $("#front_i3").click(function() {
    fadeOutAll(this.id);
  });
  $("#front_i2").click(function() {
    fadeOutAll(this.id);
  });
  $("#front_i5").click(function() {
    fadeOutAll(this.id);
  });
  $("#front_i6").click(function() {
    fadeOutAll(this.id);
  });
});

function showDemo(which)
  {
  document.getElementById("a4_crop").style.display = "none";
  document.getElementById("jquery_easing").style.display = "none";

  switch(which)
    {
    case 1:
      document.getElementById("a4_crop").style.display = "block";
      break;
    case 2:
      document.getElementById("jquery_easing").style.display = "block";
      break;
    }
  }
var urlstr;

function newWin(which)
  {
  switch(which)
    {
    case 1:
      urlstr = "http://www.whenareyoufree.info/pnf";
      header = "Demo1";
      break;
    case 2:
      urlstr = "http://www.macent.co.uk/easing.html";
      header = "Demo2";
      break;
    }

  window.open(urlstr,header,"width=1000,height=800,dependent,toolbar=yes,resizable=yes,scrollbars=yes,left=0,top=0,screenX=0,screenY=0");
  }

function resetPage()
  {
  document.getElementById("i3_details_top").style.display = "none";
  document.getElementById("i3_details_bottom").style.display = "none";
  document.getElementById("i4_details_top").style.display = "none";
  document.getElementById("i4_details_bottom").style.display = "none";
  document.getElementById("i2_details_top").style.display = "none";
  document.getElementById("i2_details_bottom").style.display = "none";
  document.getElementById("i5_details_top").style.display = "none";
  document.getElementById("i5_details_bottom").style.display = "none";
  document.getElementById("i6_details_top").style.display = "none";
  document.getElementById("i6_details_bottom").style.display = "none";
  $('#front_i4').attr({src:"images2/front_i4.png"});

  $('#front_i4').fadeIn('slow', function() {
  });
  $('#front_i3').fadeIn('slow', function() {
  });
  $('#front_i2').fadeIn('slow', function() {
  });
  $('#front_i5').fadeIn('slow', function() {
  });
  $('#front_i6').fadeIn('slow', function() {
  });
  }

function fadeOutAll(what)
  {
  document.getElementById("demotip").style.display = "none";
  document.getElementById("demotip_down").style.display = "none";
  document.getElementById("i3_details_top").style.display = "none";
  document.getElementById("i3_details_bottom").style.display = "none";
  document.getElementById("i4_details_top").style.display = "none";
  document.getElementById("i4_details_bottom").style.display = "none";
  document.getElementById("i2_details_top").style.display = "none";
  document.getElementById("i2_details_bottom").style.display = "none";
  document.getElementById("i5_details_top").style.display = "none";
  document.getElementById("i5_details_bottom").style.display = "none";
  document.getElementById("i6_details_top").style.display = "none";
  document.getElementById("i6_details_bottom").style.display = "none";

  switch(what)
    {
    case "front_i3":
      $('#front_i6').fadeOut('slow', function() {
      });
      $('#front_i5').fadeOut('slow', function() {
      });
      $('#front_i2').fadeOut('slow', function() {
      });
      $('#front_i4').fadeOut('slow', function() {
      });
      var t=setTimeout("$('#i3_details_top').fadeIn('slow', function() {});$('#i3_details_bottom').fadeIn('slow', function() {});",1000)

      break;
    case "front_i4":
      $('#front_i6').fadeOut('slow', function() {
      });
      $('#front_i5').fadeOut('slow', function() {
      });
      $('#front_i2').fadeOut('slow', function() {
      });
      $('#front_i3').fadeOut('slow', function() {
      });
      var t=setTimeout("$('#i4_details_top').fadeIn('slow', function() {});$('#i4_details_bottom').fadeIn('slow', function() {});",1000)

      break;
    case "front_i2":
      $('#front_i6').fadeOut('slow', function() {
      });
      $('#front_i5').fadeOut('slow', function() {
      });
      $('#front_i4').fadeOut('slow', function() {
      });
      $('#front_i3').fadeOut('slow', function() {
      });
      $('#front_i2').fadeOut('slow', function() {
      });
      $('#front_i4').fadeIn('slow', function() {
      });
      $('#front_i4').attr({src:"images2/front_i2.png"});

      var t=setTimeout("$('#i2_details_top').fadeIn('slow', function() {});$('#i2_details_bottom').fadeIn('slow', function() {});",1000)

      break;
    case "front_i5":
      $('#front_i6').fadeOut('slow', function() {
      });
      $('#front_i5').fadeOut('slow', function() {
      });
      $('#front_i4').fadeOut('slow', function() {
      });
      $('#front_i3').fadeOut('slow', function() {
      });
      $('#front_i2').fadeOut('slow', function() {
      });
      $('#front_i4').fadeIn('slow', function() {
      });
      $('#front_i4').attr({src:"images2/front_i5.png"});

      var t=setTimeout("$('#i5_details_top').fadeIn('slow', function() {});$('#i5_details_bottom').fadeIn('slow', function() {});",1000)

      break;
    case "front_i6":
      $('#front_i6').fadeOut('slow', function() {
      });
      $('#front_i5').fadeOut('slow', function() {
      });
      $('#front_i4').fadeOut('slow', function() {
      });
      $('#front_i3').fadeOut('slow', function() {
      });
      $('#front_i2').fadeOut('slow', function() {
      });
      $('#front_i4').fadeIn('slow', function() {
      });
      $('#front_i4').attr({src:"images2/front_i6.png"});

      var t=setTimeout("$('#i6_details_top').fadeIn('slow', function() {});$('#i6_details_bottom').fadeIn('slow', function() {});",1000)

      break;
    }
  }
<!--checks to see if visitor has flash installed-->
<!--
function FlashInstalled()
{
	result = false;

	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])
	{
		result = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
	}
	else if (document.all && (navigator.appVersion.indexOf("Mac")==-1))
	{
		// IE Windows only -- check for ActiveX control, have to hide code in eval from Netscape (doesn't like try)
		eval ('try {var xObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if (xObj)	result = true; xObj = null;	} catch (e)	{}');
	}
	return result;
}

function loginShow(showhide)
  {
  if (showhide == 1)
    {
    document.getElementById("loginshow").style.visibility = "visible"
    document.getElementById("userid").focus()
    }
  if (showhide == 0)
    {
    document.getElementById("loginshow").style.visibility = "hidden"
    }
  }

function showTest1()
  {
  document.getElementById("testimonial2").style.visibility = "hidden"
  document.getElementById("testimonial1").style.visibility = "visible"
  looptests = setTimeout('showTest2()',9000)
  }

function showTest2()
  {
  document.getElementById("testimonial1").style.visibility = "hidden"
  document.getElementById("testimonial2").style.visibility = "visible"
  looptests = setTimeout('showTest1()',9000)
  }

function hideallTest()
  {
  clearTimeout(looptests);
  document.getElementById("testimonial1").style.visibility = "hidden"
  document.getElementById("testimonial2").style.visibility = "hidden"
  }

function showMenu(showhide)
  {
  if (showhide == 1)
    {
    document.getElementById("loginshow").style.visibility = "hidden"
    document.getElementById("menuShow").style.visibility = "visible"
    }
  if (showhide == 0)
    {
    document.getElementById("menuShow").style.visibility = "hidden"
    }
  }

function sendMail()
  {
  window.location="mailto:&#100;&#101;&#115;&#105;&#103;&#110;&#64;&#109;&#97;&#99;&#101;&#110;&#116;&#46;&#99;&#111;&#46;&#117;&#107;?subject=Design Enquiry"; 
  }

function checkProceed()
  {
  if (document.getElementById("userid").value == "")
    {
    alert("You need to enter your supplied User ID.")
    document.getElementById("userid").focus()
    return false
    }
  if (document.getElementById("password").value == "")
    {
    alert("You need to enter your supplied Password.")
    document.getElementById("password").focus()
    return false
    }
  }

function routeBox(choice)
  {
  if (choice == 1)
    {
    document.getElementById("qhead").style.visibility = "visible"
    document.getElementById("qtext").style.visibility = "visible"
    document.getElementById("qbottom").style.visibility = "visible"
    document.getElementById("qhead1").style.visibility = "hidden"
    document.getElementById("qtext1").style.visibility = "hidden"
    document.getElementById("qbottom1").style.visibility = "hidden"
    }
  if (choice == 2)
    {
    document.getElementById("qhead").style.visibility = "hidden"
    document.getElementById("qtext").style.visibility = "hidden"
    document.getElementById("qbottom").style.visibility = "hidden"
    document.getElementById("qhead1").style.visibility = "visible"
    document.getElementById("qtext1").style.visibility = "visible"
    document.getElementById("qbottom1").style.visibility = "visible"
    }
  }

function setHidden()
  {
  document.getElementById("qhead1").style.visibility = "hidden"
  document.getElementById("qtext1").style.visibility = "hidden"
  document.getElementById("qbottom1").style.visibility = "hidden"
  }

function showDets(route)
  {
  if (route == 1 || route == 2 || route == 3)
    {
    document.getElementById("keydetsnlb").style.visibility = "hidden"
    document.getElementById("clientdetsnlb").style.visibility = "hidden"
    document.getElementById("keydetsspr").style.visibility = "hidden"
    document.getElementById("clientdetsspr").style.visibility = "hidden"
    document.getElementById("keydetsufr").style.visibility = "hidden"
    document.getElementById("clientdetsufr").style.visibility = "hidden"
    }
  if (route == 4 || route == 5 || route == 6)
    {
    document.getElementById("keydetsina").style.visibility = "hidden"
    document.getElementById("clientdetsina").style.visibility = "hidden"
    document.getElementById("keydetsinp").style.visibility = "hidden"
    document.getElementById("clientdetsinp").style.visibility = "hidden"
    document.getElementById("keydetsthm").style.visibility = "hidden"
    document.getElementById("clientdetsthm").style.visibility = "hidden"
    }

  if (route == 1)
    {
    document.getElementById("keydetsnlb").style.visibility = "visible"
    document.getElementById("clientdetsnlb").style.visibility = "visible"
    }
  if (route == 2)
    {
    document.getElementById("keydetsufr").style.visibility = "visible"
    document.getElementById("clientdetsufr").style.visibility = "visible"
    }
  if (route == 3)
    {
    document.getElementById("keydetsspr").style.visibility = "visible"
    document.getElementById("clientdetsspr").style.visibility = "visible"
    }
  if (route == 4)
    {
    document.getElementById("keydetsina").style.visibility = "visible"
    document.getElementById("clientdetsina").style.visibility = "visible"
    }
  if (route == 5)
    {
    document.getElementById("keydetsinp").style.visibility = "visible"
    document.getElementById("clientdetsinp").style.visibility = "visible"
    }
  if (route == 6)
    {
    document.getElementById("keydetsthm").style.visibility = "visible"
    document.getElementById("clientdetsthm").style.visibility = "visible"
    }
  }

function newWindow(route)
  {
  var urlstr = ""

  if (route == 1)
    {
    urlstr += "http://www.neillawsonbaker.com"
    header = "Pilgrims"
    }
  if (route == 2)
    {
    urlstr += "http://www.pictureframes.co.uk"
    header = "UFrame"
    }
  if (route == 3)
    {
    urlstr += "http://www.sprintercouriers.co.uk/index.html"
    header = "Sprinter"
    }
  if (route == 4)
    {
    urlstr += "http://www.insideambient.com"
    header = "InsideAmbient"
    }
  if (route == 5)
    {
    urlstr += "http://www.insidepeople.co.uk"
    header = "ThistleHotel"
    }
  if (route == 3)
    {
    }
  if (route == 6)
    {
    urlstr += "http://www.macent.co.uk/demo/scott"
    header = "NeilLawsonBaker"
    }

  window.open(urlstr,header,"width=800,height=600,dependent,toolbar=yes,resizable=yes,scrollbars=yes,left=0,top=0,screenX=0,screenY=0");
  }

function moreDets(client)
  {
  var urlstr = ""

  urlstr += "moredetails.asp?url="
  urlstr += client

  var newwin = window.open(urlstr,"Details","width=450,height=340,dependent,resizable=yes,left=0,top=0,screenX=0,screenY=0");
  newwin.focus();
  }

function routeNav(route)
  {
  var urlstr = location.href
  var equals = urlstr.indexOf("=")
  var keyword = urlstr.substr(equals+1)

  if (keyword == "pilgrims")
    {
    document.getElementById("discuss1").style.visibility = "hidden"
    document.getElementById("design1").style.visibility = "hidden"
    document.getElementById("deliver1").style.visibility = "hidden"

    if (route == 1)
      {
      document.getElementById("text2a").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2a").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2c").style.backgroundColor = "#212485";
      document.getElementById("text2c").style.color = "#FFFFFF";
      document.getElementById("discuss1").style.visibility = "visible";
      }
    if (route == 2)
      {
      document.getElementById("text2c").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2c").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#212485";
      document.getElementById("text2a").style.color = "#FFFFFF";
      document.getElementById("design1").style.visibility = "visible";
      }
    if (route == 3)
      {
      document.getElementById("text2c").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2c").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2a").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#212485";
      document.getElementById("text2b").style.color = "#FFFFFF";
      document.getElementById("deliver1").style.visibility = "visible";
      }
    }
  if (keyword == "uframe")
    {
    document.getElementById("discuss2").style.visibility = "hidden"
    document.getElementById("design2").style.visibility = "hidden"
    document.getElementById("design2a").style.visibility = "hidden"
    document.getElementById("deliver2").style.visibility = "hidden"

    if (route == 1)
      {
      document.getElementById("text2a").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2a").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2c").style.backgroundColor = "#212485";
      document.getElementById("text2c").style.color = "#FFFFFF";
      document.getElementById("discuss2").style.visibility = "visible";
      }
    if (route == 2)
      {
      document.getElementById("text2c").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2c").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#212485";
      document.getElementById("text2a").style.color = "#FFFFFF";
      document.getElementById("design2").style.visibility = "visible";
      }
    if (route == 4)
      {
      document.getElementById("text2c").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2c").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#212485";
      document.getElementById("text2a").style.color = "#FFFFFF";
      document.getElementById("design2a").style.visibility = "visible";
      }
    if (route == 3)
      {
      document.getElementById("text2").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2a").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#212485";
      document.getElementById("text2b").style.color = "#FFFFFF";
      document.getElementById("deliver2").style.visibility = "visible";
      }
    }
  if (keyword == "sprinter")
    {
    document.getElementById("discuss3").style.visibility = "hidden"
    document.getElementById("design3").style.visibility = "hidden"
    document.getElementById("deliver3").style.visibility = "hidden"

    if (route == 1)
      {
      document.getElementById("text2a").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2a").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2c").style.backgroundColor = "#212485";
      document.getElementById("text2c").style.color = "#FFFFFF";
      document.getElementById("discuss3").style.visibility = "visible";
      }
    if (route == 2)
      {
      document.getElementById("text2c").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2c").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#212485";
      document.getElementById("text2a").style.color = "#FFFFFF";
      document.getElementById("design3").style.visibility = "visible";
      }
    if (route == 3)
      {
      document.getElementById("text2c").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2c").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2a").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#212485";
      document.getElementById("text2b").style.color = "#FFFFFF";
      document.getElementById("deliver3").style.visibility = "visible";
      }
    }
  if (keyword == "insideambient")
    {
    document.getElementById("discuss4").style.visibility = "hidden"
    document.getElementById("design4").style.visibility = "hidden"
    document.getElementById("deliver4").style.visibility = "hidden"

    if (route == 1)
      {
      document.getElementById("text2a").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2a").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2c").style.backgroundColor = "#212485";
      document.getElementById("text2c").style.color = "#FFFFFF";
      document.getElementById("discuss4").style.visibility = "visible";
      }
    if (route == 2)
      {
      document.getElementById("text2c").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2c").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#212485";
      document.getElementById("text2a").style.color = "#FFFFFF";
      document.getElementById("design4").style.visibility = "visible";
      }
    if (route == 3)
      {
      document.getElementById("text2c").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2c").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2a").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#212485";
      document.getElementById("text2b").style.color = "#FFFFFF";
      document.getElementById("deliver4").style.visibility = "visible";
      }
    }
  if (keyword == "thistle")
    {
    document.getElementById("discuss5").style.visibility = "hidden"
    document.getElementById("design5").style.visibility = "hidden"
    document.getElementById("deliver5").style.visibility = "hidden"

    if (route == 1)
      {
      document.getElementById("text2a").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2a").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2c").style.backgroundColor = "#212485";
      document.getElementById("text2c").style.color = "#FFFFFF";
      document.getElementById("discuss5").style.visibility = "visible";
      }
    if (route == 2)
      {
      document.getElementById("text2c").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2c").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#212485";
      document.getElementById("text2a").style.color = "#FFFFFF";
      document.getElementById("design5").style.visibility = "visible";
      }
    if (route == 3)
      {
      document.getElementById("text2c").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2c").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2a").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#212485";
      document.getElementById("text2b").style.color = "#FFFFFF";
      document.getElementById("deliver5").style.visibility = "visible";
      }
    }
  if (keyword == "nlb")
    {
    document.getElementById("discuss6").style.visibility = "hidden"
    document.getElementById("design6").style.visibility = "hidden"
    document.getElementById("deliver6").style.visibility = "hidden"

    if (route == 1)
      {
      document.getElementById("text2a").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2a").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2c").style.backgroundColor = "#212485";
      document.getElementById("text2c").style.color = "#FFFFFF";
      document.getElementById("discuss6").style.visibility = "visible";
      }
    if (route == 2)
      {
      document.getElementById("text2c").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2c").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2b").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#212485";
      document.getElementById("text2a").style.color = "#FFFFFF";
      document.getElementById("design6").style.visibility = "visible";
      }
    if (route == 3)
      {
      document.getElementById("text2c").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2c").style.color = "#212485";
      document.getElementById("text2a").style.backgroundColor = "#FFFFFF";
      document.getElementById("text2a").style.color = "#212485";
      document.getElementById("text2b").style.backgroundColor = "#212485";
      document.getElementById("text2b").style.color = "#FFFFFF";
      document.getElementById("deliver6").style.visibility = "visible";
      }
    }
  }
-->

