$(document).ready(function() {
	
	// clone element to use as reflection
	
	$(document).pngFix(); 
	
	$("<div id='Content-Reflect-Container'></div>").html($("#Content").clone(true).attr("id","Content-Reflect")).insertAfter("#Content")
	
	//.insertAfter("#Content");					   
	
	setReflection();
	$(window).scroll(function() {
		setReflection()
	});	
	
	$(window).bind("touchstart",function() {
		setReflection()		
		alert("start")
	});
	$(window).bind("touchmove",function() {
		setReflection()		
		alert("move")
	});
	$(window).bind("touchcancel",function() {
		setReflection()	
		alert("cancel")
	});
	$(window).bind("touchend",function() {
		setReflection()	
		alert("end")
	});
	
	
	
	
	
	
	$(window).resize(function() {
  	     setReflection();
	});

	//alert($(window).height()-200-(68*2))
   $("#Paging").find("a").each(function() {						
			  createBasicReflection($(this))							
   })
   /*$("div.Title").find("h1").each(function() {						
			  createBasicReflection($(this))							
   })*/
})

function setReflection() {
	
	 $("#Content-Reflect").scrollTop($(window).scrollTop()+($(window).height()-200-(68*2)))

}

function createBasicReflection(jqNode) {
	 var reflection  = jqNode.clone(true)
	 
	 reflection.removeAttr("id").addClass("Basic-Reflection").insertAfter(jqNode)

	 jqNode.addClass("Basic-Reflection-Reflected")
	 
}
