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


		//Make sure all images are preset to 100% width of their frame.
		jQuery(".largeimage img").attr("width", "auto");
		jQuery(".largeimage img").attr("height", "100%");
		
			
			
			
			
			
	
		//Select each <a> and apply the following functions...
		jQuery('.gallery-icon a').each(function() {
		
		
		
			
			jQuery(this).bind("click", function() {
											
											// FIND THE SRC TO LOAD AS the LARGE IMAGE
										   var targetItem = jQuery(this).attr("href");
										   
										  
										   
										   
										  
											jQuery(".largeimage").hide();
										   	jQuery(".largeimage img").attr("src", targetItem);
											jQuery(".largeimage").fadeIn(500);
											
										  //SELECT THE NEXT THUMBNAIL
												//$(".gallery-icon a").removeClass('active');
//									  
//											  if($(this).parent().next().length == 0) {
//
//													$(this).parent().parent().next().addClass('active');
//											}
//												else {
//													$(this).parent().parent().next().addClass('active');
//											}
//											
//											$(this).css('border', '5px solid red');

										  return false;
			});
			
			
			

  		});
	

		
		jQuery('.close').click( function() {
		jQuery('.largeimage').fadeOut(250);
		//alert('test');
		return false;
		});

		
		jQuery('.sidebar_blog').css("opacity", "0.3");
		jQuery('.sidebar_blog').stop().hover( function() {
												jQuery(this).fadeTo("500", "1");
												},
												function() {
												jQuery(this).fadeTo("500", "0.4");
												});
		
		
   
});
