$(document).ready(function(){						   						   						   //make my curvey corners						   $('.curveycorners').wrapInner('<div class="curveycontent" />');						   	$('.curveycorners').each(function(){									  myright=$(this).width()-10;									  myheight=$(this).height()-10;	$(this).append("<div class='tops' style='top:0px;left:0px;width:"+(myright+10)+"px'></div><div class='bottoms' style='top:"+myheight+"px;left:0px;width:"+(myright+10)+"px'></div><div class='lefts' style='top:0px;left:0px;height:"+(myheight+10)+"px'></div><div class='rights' style='top:0px;left:"+myright+"px;height:"+(myheight+10)+"px'></div><div class='topleftcorner' style='top:0px;left:0px'></div><div class='toprightcorner' style='top:0px;left:"+myright+"px'></div><div class='bottomrightcorner' style='top:"+myheight+"px;left:"+myright+"px'></div><div class='bottomleftcorner' style='top:"+myheight+"px;left:0px'></div>");									  });			//newsflash			function startnews(whichnews){		if(whichnews+1>=$(".newsitem").length){			nextnews=0;					} else {			nextnews=whichnews+1;		}		$(".newsitem").eq(whichnews).animate({"opacity":"1"},{queue:false, duration:750});		$(".newsitem").eq(whichnews).animate({"top":"0px"},{queue:false, duration:2500,complete:function(){																										 																				pausenews(nextnews);						 																										 }																										 });		//alert("im moving "+whichnews);				$(".newsitem").each(function(){									// alert("in start of function"+nextnews);									 nextnews=nextnews;					if($(this).css("top")!="400px"	){						//alert($(this).css("top"));						$(this).animate({"top":"-400px"},{queue:false, duration:2500,complete:function(){																							$(this).css("top","400px");																							//alert(nextnews);																							//startnews(nextnews);																									  }																									  });						$(this).animate({"opacity":"0"},{queue:false, duration:750});											}									 	});					}		function pausenews(whichpass){		$("#newsbox").animate({"top":$("#newsbox").css("top")},{queue:false, duration:10000, complete:function(){																											startnews(whichpass);  																											  }																											  });	}		//startnews(0);		function startnewnews(whichnews){		//alert("here is whichnews plus 1"+intval(whichnews+1+"here is news length"+$(".news").length);		if(whichnews+1>=$(".news").length){			//alert("here is whichnews plus 1"+whichnews+1+"here is news length"+$(".news").length);			nextnews=0;					} else {			nextnews=whichnews+1;			//alert(nextnews);		}		$(".news").eq(whichnews).animate({"opacity":"1"},{queue:false, duration:750});		$(".news").eq(whichnews).animate({"top":"25px"},{queue:false, duration:2500,complete:function(){																										 																				pausenewnews(nextnews);						 																										 }																										 });		//alert("im moving "+whichnews);				$(".news").each(function(){									// alert("in start of function"+nextnews);									 nextnews=nextnews;					if($(this).css("top")!="400px"	){						//alert($(this).css("top"));						$(this).animate({"top":"-400px"},{queue:false, duration:2500,complete:function(){																							$(this).css("top","400px");																							//alert(nextnews);																							//startnews(nextnews);																									  }																									  });						$(this).animate({"opacity":"0"},{queue:false, duration:750});											}									 	});					}		function pausenewnews(whichpass){		//alert("got in pause"+whichpass);		$("#headsection").animate({"top":"0px"},{queue:false, duration:10000, complete:function(){																									   //alert("got in pause complete and whichpass="+whichpass);																											startnewnews(whichpass);  																											  }																											  });	}		startnewnews(0);		});
