// JavaScript Document
$.noConflict();

jQuery(document).ready(function() {
								
								
								
url_sep = document.location.href.split("#");
if(url_sep[1]!='' && document.location.href.indexOf("#") != -1 && document.location.href.indexOf("index")!= -1 )
{
	obj = jQuery('.imagGallery li[rel='+url_sep[1]+'');
	jQuery('.nav li a').removeClass('selected');	
	jQuery('.nav li.'+url_sep[1]+' a').addClass('selected');
												
	
   
    thisItem 	= url_sep[1];
    //window.location.replace("index.html");
	//alert(thisItem);
	
	//if(thisItem == "top") {
//		alert(thisItem);
//		jQuery('.imagGallery li').stop()
//		.animate({'opacity' : 1, 
//					 'width' : '205px', 
//					 'marginRight' : '10px', 
//					 'marginLeft' : '10px'
//					});
//		}
	
	if(thisItem != "all") {
	jQuery('.imagGallery li[rel!='+thisItem+']').stop()
							.animate({'width' : '0', 
										 'opacity' : '0',
										 'marginRight' : '0', 
										 'marginLeft' : '0',
										 'paddingRight' : '0',
										 'paddingLeft' : '0'
										});
	jQuery('.imagGallery li[rel='+thisItem+']').stop()
							.animate({	'width' : '205px', 
										'opacity' : 1, 
										 'marginRight' : '10px', 
										 'marginLeft' : '10px',
										 'paddingRight' : '11px',
										 'paddingLeft' : '11px'
										});
	if((document.body.clientHeight)<(screen.height))
	{
		jQuery(".footer_main").removeClass('footer_inherit');
		jQuery(".footer_main").addClass('footer_fixed');
	}
	else
	{
		jQuery(".footer_main").addClass('footer_fixed');
		jQuery(".footer_main").removeClass('footer_inherit');
	}
										
	} else {
	
	jQuery('.imagGallery li').stop()
	.animate({'opacity' : 1, 
				 'width' : '205px', 
				 'marginRight' : '10px', 
				 'marginLeft' : '10px',
				 'paddingRight' : '11px',
				 'paddingLeft' : '11px'
				});
		if((document.body.clientHeight)<(screen.height))
		{
			jQuery(".footer_main").addClass('footer_inherit');
			jQuery(".footer_main").removeClass('footer_fixed');
		}
		else
		{
			jQuery(".footer_main").removeClass('footer_fixed');
			jQuery(".footer_main").addClass('footer_inherit');
		}
	}	
}
else
{
				
		
	url_sep_name = 'all1';			
				
				
				obj = jQuery('.imagGallery li[rel='+url_sep_name+'');
	jQuery('.nav li a').removeClass('selected');	
	jQuery('.nav li.'+url_sep_name+' a').addClass('selected');
												
	
   
    thisItem 	= url_sep_name;
    //window.location.replace("index.html");
	//alert(thisItem);
	
	//if(thisItem == "top") {
//		alert(thisItem);
//		jQuery('.imagGallery li').stop()
//		.animate({'opacity' : 1, 
//					 'width' : '205px', 
//					 'marginRight' : '10px', 
//					 'marginLeft' : '10px'
//					});
//		}
	
	if(thisItem != "all") {
	jQuery('.imagGallery li[rel!='+thisItem+']').stop()
							.animate({'width' : '0', 
										 'opacity' : '0',
										 'marginRight' : '0', 
										 'marginLeft' : '0',
										 'paddingRight' : '0',
										 'paddingLeft' : '0'
										});
	jQuery('.imagGallery li[rel='+thisItem+']').stop()
							.animate({	'width' : '205px', 
										'opacity' : 1, 
										 'marginRight' : '10px', 
										 'marginLeft' : '10px',
										 'paddingRight' : '11px',
										 'paddingLeft' : '11px'
										});
	if((document.body.clientHeight)<(screen.height))
	{
		jQuery(".footer_main").removeClass('footer_inherit');
		jQuery(".footer_main").addClass('footer_fixed');
	}
	else
	{
		jQuery(".footer_main").addClass('footer_fixed');
		jQuery(".footer_main").removeClass('footer_inherit');
	}
										
	}
}


jQuery('.nav li a').click(function() {
jQuery('.nav li a').removeClass('selected');


jQuery(this).addClass('selected');
jQuery(".imagGallery").css({'height' : '100%', 'padding-bottom' : '2%'});
thisItem 	= jQuery(this).attr('rel');
//window.location.replace("index.html");

if(thisItem != "all") {
jQuery('.imagGallery li[rel!='+thisItem+']').stop()
						.animate({'width' : '0px', 
									 'opacity' : '0',
									 'marginRight' : '0', 
									 'marginLeft' : '0',
									 'paddingRight' : '0',
									 'paddingLeft' : '0'
									});
jQuery('.imagGallery li[rel!='+thisItem+'] a').css({'display':'none'});

jQuery('.imagGallery li[rel='+thisItem+']').stop()
						.animate({	'width' : '205px', 
								 	'opacity' : 1, 
									 'marginRight' : '10px', 
									 'marginLeft' : '10px',
									 'paddingRight' : '11px',
									 'paddingLeft' : '11px'
									});
jQuery('.imagGallery li[rel='+thisItem+'] a').css({'display':'block'});
if((document.body.clientHeight)<(screen.height))
{
	jQuery(".footer_main").removeClass('footer_inherit');
	jQuery(".footer_main").addClass('footer_fixed');
}
else
{
	jQuery(".footer_main").addClass('footer_fixed');
	jQuery(".footer_main").removeClass('footer_inherit');
}
} else {
	
		
jQuery(".imagGallery").css({'height' : '100%', 'padding-bottom' : '1%'});
jQuery('.imagGallery li').stop()
.animate({'opacity' : 1, 
			 'width' : '205px', 
			 'marginRight' : '10px', 
			 'marginLeft' : '10px',
			 'paddingRight' : '11px',
			 'paddingLeft' : '11px'
			});
	
jQuery('.imagGallery li a').css({'display':'block'});
if((document.body.clientHeight)<(screen.height))
{
	jQuery(".footer_main").addClass('footer_inherit');
	jQuery(".footer_main").removeClass('footer_fixed');
}
else
{
	jQuery(".footer_main").removeClass('footer_fixed');
	jQuery(".footer_main").addClass('footer_inherit');
}
}
})

});
