$(document).ready(function() {

var open = '260px';
var openform = '0px';
var closed = '0px';
var closedform = '-330px';

  $("#contact_btn").click(function() {
	$('#contact').animate({left: open}, 'slow'); 
		setTimeout(function(){
		$('#close_btn').fadeIn( 1000, function(){
		}, 1000);
		});
		$('#contact_btn').fadeOut( 10);
		$('#form_btn').fadeOut( 10 );
		$('#btn_web').css({"z-index":"-10"});
		$('.cont').css({"z-index":"2"});
		
	});
	
	$("#close_btn").click(function() {
	$('#contact').animate({left: closed}, 'slow'); 
		$('#close_btn').fadeOut( 100 );
		setTimeout(function(){
		$('#contact_btn').fadeIn( 1000);
		$('#form_btn').fadeIn( 1000);
		$('#btn_web').css({"z-index":"10"});
		}, 500);
		$('.cont').css({"z-index":"0"});
	});
	
	$("#form_btn").click(function() {
	$('#contact_form').animate({left: openform}, 'slow'); 
		setTimeout(function(){
		$('#close_form').fadeIn( 1000, function(){
		}, 1000);
		});
		$('#contact_btn').fadeOut( 10);
		$('#form_btn').fadeOut( 10 );
		$('#btn_web').css({"z-index":"-10"});
		$('.cont').css({"z-index":"2"});
		
	});
	
	$("#close_form").click(function() {
	$('#contact_form').animate({left: closedform}, 'slow'); 
		$('#close_form').fadeOut( 100 );
		setTimeout(function(){
		$('#contact_btn').fadeIn( 1000);
		$('#form_btn').fadeIn( 1000);
		$('#btn_web').css({"z-index":"10"});
		}, 500);
		$('.cont').css({"z-index":"0"});
	});
	
	$("#slide").mouseover(function() {
		$('#zum_port').fadeIn( 1000 );
	});
	
	$("#interiors").mouseover(function() {
		$('#int_title').css({ "color": "#fff", "background": "#000" });
	});
	
	$("#interiors").mouseout(function() {
		$('#int_title').css({ "color":"#727272", "background":"none" });
	});
	
	$("#exteriors").mouseover(function() {
		$('#ext_title').css({ "color": "#fff", "background": "#000" });
	});
	
	$("#exteriors").mouseout(function() {
		$('#ext_title').css({ "color":"#727272", "background":"none" });
	});
	
	$("#modelling").mouseover(function() {
		$('#mod_title').css({ "color":"#fff" ,"background":"#000" });
	});
	
	$("#modelling").mouseout(function() {
		$('#mod_title').css({ "color":"#727272" ,"background":"none" });
	});
	
	$("#graf_des").mouseover(function() {
		$('#graf_title').css({ "color": "#fff", "background": "#000" });
	});
	
	$("#graf_des").mouseout(function() {
		$('#graf_title').css({ "color":"#727272", "background":"none" });
	});
	
	

	
	
	$(document).ready(function() {
		$('#coin-slider').coinslider({ width: 700, navigation: true, delay: 5000 });
	});


//Menu
  
    //When trigger is clicked...  
  
        //Following events are applied to the subnav itself (moving subnav up and down)  
 //Drop down the subnav on click  
      
	
        $("#btn_web").hover(function() {
	    $(this).animate({"top":"60px"}, 800).parent().find("#websubnav").stop(true, true).slideDown(800).show();
        }, function(){  
	    $(this).animate({"top":"60px"}, 800).parent().find("#websubnav").stop(true, true).slideUp(800); //When the mouse hovers out of the subnav, move it back up
        });  
		
		$("#btn_d3d").hover(function() {
	    $(this).animate({"top":"60px"}, 800).parent().find("#d3subnav").stop(true, true).slideDown(800).show();
        }, function(){  
	    $(this).animate({"top":"60px"}, 800).parent().find("#d3subnav").stop(true, true).slideUp(800); //When the mouse hovers out of the subnav, move it back up
        }); 
    
	
});


