// JavaScript Document
$(document).ready( function () {	


$("#menu2_bt_photography").livequery('click', function(event) {
													   
	$("#menu_drawings").slideUp(500 ,function () {
		if ($("body").hasClass("bodybg"))
		$("body").removeClass("bodybg");
		$("body").addClass("nobg");
	    $("#bgimage").fadeOut(500);
		$("#contactdiv").fadeOut("fast");
		$("#main_content").fadeOut(500,function(){
		$("#menu2_newsletter").fadeOut(500,"easeInOutQuad");
		$("#shoppingcart2").fadeOut(600,"easeInOutQuad");
		$("#logo_phoenix").hide(300,"easeInOutQuad");
		$("#navigation_works2").fadeOut("Slow",function(){
		$("#container").css({ width:"100%"});
		$("#content").css({ width:"100%"});
	    $("body").animate({backgroundColor: '#000000'},"slow",function(){
		$("#menu_photography").load('include/menu_photography.php',function(){
		$(this).slideDown("slow","easeOutQuad");
		$('#main_content_black').load('include/thumbnail_photography.php?category=7',function(){
		$('#main_content_black').fadeIn(500);
		$("#navigation_works1").fadeIn(500,"easeInOutQuad");
		});});});});});}); return false
		}); 



//Gallery

	$(".menuheader").livequery('click', function(event) {
    obj = $(this);
    obj.id = obj.attr("id"); 
	$("#main_content").fadeOut(500,function(){
	//if ($("#menu_drawings").css({position:"relative"}))
	//$("#menu_drawings").css({position:"absolute"});
	$('#main_content').load('include/thumbnail_detail.php?subcategory='+ obj.id,function(){
	$('#main_content').fadeIn(500);
	

});
});
return false;
}); 


$("a.header_drawings").livequery('click', function(event) {
    obj = $(this);
    obj.id = obj.attr("id");

	$("#main_content").fadeOut(500,function(){
  //  if ($("#menu_drawings").css({position:"relative"}))
	//$("#menu_drawings").css({position:"absolute"});
	$('#main_content').load('include/zoom_drawings.php?project_id='+ obj.id,function(){

	$('#main_content').fadeIn(500);
});
});
return false;
}); 

////////// IMAGE TOOLTIP //////////////////////


$('.hoverimg')
    .livequery(function(){ 
    // use the helper function hover to bind a mouseover and mouseout event 
        $(this) 
            .hover(function() { 
				 $('#description_tn' + this.id).show("slow","easeOutQuart");
            }, function() { 
				 $('#description_tn' + this.id).hide("slow","easeOutQuart");
            }); 
    }, function() { 
        // unbind the mouseover and mouseout events 
        $(this) 
            .unbind('mouseover') 
            .unbind('mouseout'); 
    }); 

	
	$('.hoverdetail')
    .livequery(function(){ 
    // use the helper function hover to bind a mouseover and mouseout event 
        $(this) 
            .hover(function() { 
				 $('#description_tn' + this.id).slideDown("slow","easeOutQuart");
            }, function() { 
				 $('#description_tn' + this.id).slideUp("slow","easeOutQuart");
            }); 
    }, function() { 
        // unbind the mouseover and mouseout events 
        $(this) 
            .unbind('mouseover') 
            .unbind('mouseout'); 
    }); 
	

$('.hoverimg').livequery('click', function(event) {
    obj = $(this);
    obj.id = obj.attr("id");
	$("#main_content").fadeOut(500,function(){
	$("#main_content_black").fadeOut(500,function(){
	 //ddaccordion.expandone('menuheader', 1);
  //  if ($("#menu_drawings").css({position:"relative"}))
	//$("#menu_drawings").css({position:"absolute"});
	$('#main_content').load('include/zoom_drawings.php?project_id='+ obj.id,function(){
	$('#main_content').fadeIn(500);
}); }); 
}); 

return false;
}); 




$('.linkbox')
    .livequery(function(){ 
    // use the helper function hover to bind a mouseover and mouseout event 
        $(this) 
            .hover(function() { 
				 $('#description_link' + this.id).show("slow","easeOutQuart");
            }, function() { 
				 $('#description_link' + this.id).hide("slow","easeOutQuart");
            }); 
    }, function() { 
        // unbind the mouseover and mouseout events 
        $(this) 
            .unbind('mouseover') 
            .unbind('mouseout'); 
    }); 




//end white.js
});

