/*-----------------------------------------------------------------------------------------------------------------------------
* Function: Gallery 
* Description: 
* Author: Tanvir Ahmad (Ronty)
    ---------------------------------------------------------------------------------------------------------------------------*/


$(document).ready(function() {

// Hide all the Gallery Details Div
$('.galleryDetails').hide('fast');

//Click on Gallery Thumb
$('#gallery #thumb a').click(function(){
			
			var uri = $(this).attr('href'); // Get the url
			
			var urlArrau = new Array();
			urlArrau = uri.split('#'); // get the #key Div ID
			
			homesearchID="#GDetails_"+urlArrau[1];
			
			
			var valu=$(homesearchID).html(); // get the Div Html from #div
			
			$('#full').fadeOut('fast',function(){ // Fade out current full Details div contain
					
						$('#full').html(valu).fadeIn('slow'); // Fade in new full details Contain
					
					});
		return false; // stop href 
		});


// if your in gallery page check it form url then dispaly the first thamb detauls
	var pathname = window.location.hash;
	if((pathname!='') && (pathname=='#show'))
	{
		$('#gallery #thumb a:first').click(); // display first thumb details.
	}

}); // ready end