$(document).ready(function(){ 

	$('#slideshow').cycle({ 
    		speed:  300,
			random:	1
	});
	
	$("#homebutton").click(function(){
    $("#slideshow img").addClass("slideshow-resize2");
    });
	
	$("#slideshow img").addClass("slideshow-resize");
	
	$(".post-projects a").attr("rel","projects-load");
	
	$(".post-commercial a").attr("rel","commercial-load");
	
	$(".post-architecture a").attr("rel","architecture-load");
	
	
	$(".post-architecture img, .post-commercial img, .post-projects img,").click(function(){
    $("#coverall2").show().delay(300).hide(1);
    });
	
	
	$("#coverall").delay(1000).hide(1);
	
	
	$("a[rel='projects-load']").colorbox({
		onOpen:function(){ $("#icons").hide(); },
		onClosed:function(){ $("#icons").show(); } 
	});
	
	$("a[rel='commercial-load']").colorbox({
		onOpen:function(){ $("#icons").hide(); },
		onClosed:function(){ $("#icons").show(); } 
	});
	
	$("a[rel='architecture-load']").colorbox({
		onOpen:function(){ $("#icons").hide(); },
		onClosed:function(){ $("#icons").show(); } 
	});
	
	
	
	$("#contents, #facebookmessage, #flickrmessage, #tumblrmessage, #nextmessage, #previousmessage, #startmessage, #coverall2, #icons").hide();
	
	$("#messageblocker").delay(1000).hide(1);
	
	$(".icon1, #contents, #trigger, #icons").mouseover(function(){
    $("#contents, #icons").show();
    });
	
	$(".icon1, #contents, #trigger").mouseout(function(){
    $("#contents, #icons").hide();
    });
	
	$("#homebutton, #commercialbutton, #architecturebutton, #projectsbutton, #infobutton, #filmbutton, #contactbutton, #facebook, #flickr, #tumblr").click(function(){
    $("#contents, #icons").hide();
    });
	
	$("#facebook").mouseover(function(){
    $("#facebookmessage").show();
    });
	
	$("#facebook").mouseout(function(){
    $("#facebookmessage").hide();
    });
	
	$("#flickr").mouseover(function(){
    $("#flickrmessage").show();
    });
	
	$("#flickr").mouseout(function(){
    $("#flickrmessage").hide();
    });
	
	$("#tumblr").mouseover(function(){
    $("#tumblrmessage").show();
    });
	
	$("#tumblr").mouseout(function(){
    $("#tumblrmessage").hide();
    });
	
	
	
	
	$("#contentholder2 a, #contentholder3 a").hover(function () {
    	$(this).css({'background-color' : 'transparent', 'border-bottom' : 'solid 7px black'});
		}, function () {
			var cssObj = {
				'background-color' : 'transparent',
				'border-bottom' : 'solid 7px transparent'
		}
		$(this).css(cssObj);
  	});
	
	$(".insideinfo a").hover(function () {
    	$(this).css({'background-color' : 'transparent', 'border-bottom' : 'solid 3px black'});
		}, function () {
			var cssObj = {
				'background-color' : 'transparent',
				'border-bottom' : 'solid 3px transparent'
		}
		$(this).css(cssObj);
  	});
	
	$("#contents a").hover(function () {
    	$(this).css({'background-color' : 'transparent', 'border-bottom' : 'solid 3px black'});
		}, function () {
			var cssObj = {
				'background-color' : 'transparent',
				'border-bottom' : 'solid 3px transparent'
		}
		$(this).css(cssObj);
  	});
	
	$(".post a").hover(function () {
    	$(this).css({'background-color' : 'transparent', 'border-bottom' : 'solid 7px black'});
		}, function () {
			var cssObj = {
				'background-color' : 'transparent',
				'border-bottom' : 'solid 7px transparent'
		}
		$(this).css(cssObj);
  	});
	
});	


$(window).resize(function(){ 
	$.fn.colorbox.load(); 
});
