/* jQuery.noConflict(); */


animatedcollapse.addDiv('spot-a', 'hide=1')
animatedcollapse.addDiv('spot-b', '')
animatedcollapse.addDiv('michael', 'fade=1,height=120px')

animatedcollapse.addDiv('cat', 'fade=0,speed=400,group=pets')
animatedcollapse.addDiv('dog', 'fade=0,speed=400,group=pets,persist=1,hide=1')
animatedcollapse.addDiv('rabbit', 'fade=0,speed=400,group=pets,hide=1')

animatedcollapse.ontoggle=function($, divobj, state){ //fires each time a DIV is expanded/contracted
	//$: Access to jQuery
	//divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID
	//state: "block" or "none", depending on state
}

animatedcollapse.init()

function destroyImg()
		{
		jQuery(".mypicture").fadeTo("fast", 0);
		}

jQuery(document).ready(function(){

	// Toggle Login form
	$("#btnLogin").toggle(
		function () {
			$("#login-box").animate( { height:"50px" }, { queue:false, duration:1500 } )
			.animate( { padding:"15px" }, 1500 )
		},
		function () {
			$("#login-box").animate( { height:"0px" }, { queue:false, duration:1500 } )
			.animate( { padding:"0px" }, 1500 )
		}
    );
	
	$("#btnClose").click(function () {
				$("#login-box").animate( { height:"0px" }, { queue:false, duration:1500 } )
			.animate( { padding:"0px" }, 1500 )
		});


	// Hide elements on page load
	jQuery(".blog h2.entry-title").fadeTo(0, 0);
	jQuery(".blog div.entry-content").fadeTo(0, 0);
	jQuery(".blog div.entry-meta").fadeTo(0, 0);
	jQuery("#content .entry-content div.large-image p").fadeTo(0, 0);
	jQuery(".blog .hentry .hoverbg").fadeTo(0, 0);
	jQuery(".single .post-image-container .photo-credit").fadeTo(0, 0);

	jQuery(".blog .hentry .post-image-container").fadeTo(0, 1.0);
	jQuery(".blog .hentry .post-image-container img").hide().fadeIn(500);
	jQuery(".single .hentry .post-image-container img").hide().fadeIn(500);

	jQuery(".blog #content .entry-content").css("margin-left", 0);
	jQuery(".blog #content .hentry h2").css("margin-left", 0);
	
	// Hover animations for Home Pages
	jQuery(".blog .hentry").hover(function(){
		jQuery(this).children("h2.entry-title").stop(true).fadeTo("fast", 1.0);
		jQuery(this).children("div.entry-content").stop(true).fadeTo("fast", 1.0);
		jQuery(this).children(".post-image-container").stop(true).fadeTo("fast", 0.15);
		jQuery(this).children("div.entry-meta").stop(true).fadeTo("fast", 1);
	}, function(){
		jQuery(this).children("h2.entry-title").stop(true).fadeTo("fast", 0);
		jQuery(this).children("div.entry-content").stop(true).fadeTo("fast", 0);
		jQuery(this).children(".post-image-container").stop(true).fadeTo("fast", 1.0);
		jQuery(this).children("div.entry-meta").stop(true).fadeTo("fast", 0);
	});

	// Hover animations for Single Pages
	jQuery(".single .mypicture").hover(function(){
		jQuery(this).children(".icon").stop().animate({opacity:'1'},{queue:false, duration:"fast"}) 
		jQuery(this).children(".post-image-container").stop(true).fadeTo("fast", 0.15);	
	}, function(){
		jQuery(this).children(".post-image-container").stop(true).fadeTo("fast", 1.0);
		jQuery(this).children(".icon").stop().animate({opacity:'0'},{queue:false, duration:"fast"}) 
	});
	
	// Hover animations for Category Pages
	jQuery(".category .placeholder").hover(function(){
		jQuery(this).children(".post-image-container").stop(true).fadeTo("fast", 0.15);	
		jQuery(this).children(".image-over").stop(true).fadeTo("fast", 1);	
	}, function(){
		jQuery(this).children(".post-image-container").stop(true).fadeTo("fast", 1.0);
		jQuery(this).children(".image-over").stop(true).fadeTo("fast", 0);	
	});

	 jQuery(".thisclient").mouseover(function(){  
        jQuery("img", this).stop().animate({opacity:'1'},{queue:false, duration:600, easing: 'easeOutBounce'})  
     }); 
     
     jQuery(".thisclient").mouseout(function(){  
        jQuery("img", this).stop().animate({opacity:'0.8'},{queue:false, duration:600, easing: 'easeOutBounce'})  
     });  

		// Toggle For Client List
	$(".btnMore").toggle(
		function () {
			$("#client-list").animate( { height:"525px" }, { queue:false, duration:1500 } )
			$(".clients").animate( { height:"525px" }, { queue:false, duration:1500 } )
			$(".menu-client-item .see").stop().animate({opacity:'0'},{queue:false, duration:100, easing: 'easeOutBounce'})
			$(".menu-client-item .hidden").stop().animate({opacity:'1'},{queue:false, duration:600, easing: 'easeOutBounce'})  	
		},
		function () {
			$("#client-list").animate( { height:"190px" }, { queue:false, duration:1500 } )
			$(".clients").animate( { height:"190px" }, { queue:false, duration:1500 } )
			$(".menu-client-item .see").stop().animate({opacity:'1'},{queue:false, duration:600, easing: 'easeOutBounce'})
			$(".menu-client-item .hidden").stop().animate({opacity:'0'},{queue:false, duration:100, easing: 'easeOutBounce'})  
		}
    );


});
