// JavaScript Document
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

$(document).ready(function(){
	  
	  var showingHi = true;
	  var videLeft = 527;
	  
		$(".design").hide();
		$(".galleri2").hide();
		$(".project").hide();
		$(".galleri").hide();
		$(".vide").hide();
		$(".designBtn").hide();
		$(".project").show();
		$(".galleri").show();

		
$(".button1").click(function () {
if(showingHi == false){
	  $(".design").hide();
	  $(".galleri2").hide();
	  $("#designBtn").hide();
	  $("#designBtn").css("left", 0);
	  $("#gallery2").css("left", 1000);
	  $("#projectBtn").show();
	  $("#projectBtn").css("left", 112);
	  $(".project").show();
	  $(".galleri").show();
	  $("#gallery").css("left", 527);
	  $(".vide").hide();
		$(".vide").css("left",1000);
		$("#bigPic").show();
	  showingHi = true;
      return false;
	  };
    });
	
	$(".button2").click(function () {
	if(showingHi == true){
      $(".project").hide();
	  $(".galleri").hide();
	  $("#projectBtn").hide();
	  $("#projectBtn").css("left", 0);
	  $("#gallery").css("left", 1000);
	  $("#designBtn").show();
	  $("#designBtn").css("left", 192);
	  $(".design").show();
	  $(".galleri2").show();
	  $("#gallery2").css("left", 527);
	  showingHi = false;
      return false;
	  };
    });
	
	$(".vid").click(function(){
		$(".vide").show();
		$(".vide").css("left",videLeft);
		$("#bigPic2").hide();
		$("#bigPic").hide();
	});
	

	$(".thumbs a").click(function(){
		$(".vide").hide();
		$(".vide").css("left",1000);
		$("#bigPic").show();
	
		var largePath = $(this).attr("href");
       <!--  for example: the first variable of "largePath" have the value of "images/img2-lg.jpg" -->
		
        var largeAlt = $(this).attr("title");
		<!--  for example: the first variable of "largeAlt" have the value of "Image 2" -->
		
        $("#bigPic").attr({ src: largePath, alt: largeAlt });
        <!-- charge the large image -->
		

        <!-- add image name(for example: "Image 2" ) and parentheses inside the <em> -->
       return false;
	});
	
	$(".thumbs2 a").click(function(){
	
	    $(".vide").hide();
		$(".vide").css("left",1000);
		$("#bigPic2").show();
		var largePath = $(this).attr("href");
       <!--  for example: the first variable of "largePath" have the value of "images/img2-lg.jpg" -->
		
        var largeAlt = $(this).attr("title");
		<!--  for example: the first variable of "largeAlt" have the value of "Image 2" -->
		
		$("#bigPic2").attr({ src: largePath, alt: largeAlt });
        <!-- charge the large image -->
		

        <!-- add image name(for example: "Image 2" ) and parentheses inside the <em> -->
       return false;
	});
	
	jQuery.each(jQuery.browser, function(i) {
  if($.browser.msie){
			$("#gallery").css("top", 178);
			$("#gallery2").css("top",178);
			$(".vid").css("top",0);
			$(".thumbs").css("margin-top",0);
			$(".thumbs2").css("margin-top",0);
			$(".vide").css("top",195);
			videLeft = 513;
		};
	});
	
	

 });
