$(document).ready(function(){
	$("#footer").html('<img src="images/at_logo.gif" alt="alextreadway" style="display:none;" /><div id="insidefooter"><div class="clearer"></div></div>');
	$("#footer img").load(function(){
		//$(".leftImage img").hide("fast");
		$("#footer img").delay(200).fadeIn(1000);
	});

	$("#footerHome").html('<img src="images/at_logo.gif" alt="alextreadway" style="display:none;" /><div id="insidefooter"><div class="clearer"></div></div>');
	$("#footerHome img").load(function(){
		//$(".leftImage img").hide("fast");
		$("#footerHome img").delay(200).fadeIn(1000);
	});
			
	$(".leftImage").each(function(i) {///for home page and contact page
		id = $(this).attr('id');
		$(this).html('<img src="'+id+'" alt="alex" style="display:none;"/>');
			$(".leftImage img").load(function(){
				//$(".leftImage img").hide("fast");
				$(".leftImage img").delay(200).fadeIn(1000);
				
			});
	});
	
	$(".rightColumn").each(function(i) {///for contact page not used 
		id = $(this).attr('id');
		$(this).html('<img src="'+id+'" alt="contact" style="display:none;" />');
			$(".rightColumn img").load(function(){
				//$(".leftImage img").hide("fast");
				$(".rightColumn img").delay(200).fadeIn(1000);
			});
	});
	
	$(".img_holder").each(function(i) {///for large thumbs, album cover
		id = $(this).attr('id');
		idAr = id.split("-");//cover name - gallery name
		$(this).html('<a href="'+ idAr[2] +'" title="'+ idAr[1] +'"><img src="'+ idAr[0] +'" style="display:none;" class="ajaxLoadM_'+ i +'" width="172" height="114" alt="'+ idAr[1] +'" /></a>');
		$(".ajaxLoadM_"+i+"").load(function () {
				$(".ajaxLoadM_"+i+"").delay(200).fadeIn(1000);	
		});
		
		$(this).mouseover(function () {//alert($(this).closest(".imageHolder").find(".thumbTitle a").html());
			$(this).fadeTo(100,0.4).fadeTo(300,1);
			$(this).closest(".imageHolder").find(".thumbTitle a").css("color","#333333");
		}).mouseout(function () {//alert($(this).closest(".imageHolder").find(".thumbTitle a").html());
			$(this).closest(".imageHolder").find(".thumbTitle a").css("color","#999999");
		});
		$(this).closest(".imageHolder").find(".thumbTitle a").mouseover(function () {//alert($(this).closest(".imageHolder").find(".thumbTitle a").html());
			$(this).css("color","#333333");
		}).mouseout(function () {//alert($(this).closest(".imageHolder").find(".thumbTitle a").html());
			$(this).css("color","#999999");
		});
	});
	//$(".transSliderImg").css('background','url(../images/alpha_trans.png)');
	$(".smallThumb").each(function(i) {///for small thumbs in header
				id = $(this).attr('id');
				idAr = id.split("-");//imagepath - image heading
				
				$(this).html('<img src="'+ idAr[0] +'" style="display:none;" class="ajaxLoad_'+ i +'" title="'+ idAr[1] +'" width="38" height="38" alt="'+ idAr[1] +'" />');
				$(".ajaxLoad_"+i+"").load(function () {
						$(".ajaxLoad_"+i+"").fadeIn(500);//initial opacity of small thumb to 0.3
						//$(".ajaxLoad_"+i+"").fadeIn('slow');
						//$("img .ajaxLoad_"+i+"").unbind('click');
						$(".layer_"+i+"").hide();
						//$("img .ajaxLoad_"+count+"").unbind('mouseover');
								 
					   $(".ajaxLoad_"+i+"").mouseover(function () {  //mouseover effect of small thumb after sliding effect
							$(this).fadeTo(100,0.4).fadeTo(300,1);
					   });
				});
	});
	
	$(".Big_Image").each(function(i) {///for small thumbs in header
				id = $(this).attr('id');
				idAr = id.split("-");//imagepath - image heading
				
				$(this).html('<img src="'+ idAr[0] +'" style="display:none;" class="ajaxLoadBig_'+ i +'" title="'+ idAr[1] +'" width="'+idAr[2]+'" alt="'+ idAr[1] +'" />');
				$(".ajaxLoadBig_"+i+"").load(function () {
						$(this).fadeIn(500);//initial opacity of small thumb to 0.3
						
				});
	});

	
});
jQuery(function($){
	$(".rightContent img").each(function(i){
		$(this).hide();
		$(this).load(function(){
				$(this).delay(200).fadeIn(1000);
			});								 
	});
});
