// JavaScript Document

$(document).ready(function() {
	  	$.get("http://www.wirelessestimator.com/emergency/nate-countdown.html",function(data){
				$("body").append(data);
var       nateLocation,jeapLocation;

		

		
			//Script courtesy of Sharon Gartenberg's Date Countdown
			//JavaScript generator under the GNU General Public License
			
//			var today = new Date;
//			var Future0 = new Date;
//			ThisYear = 2010;
//			
//			var FutureMonth = 1;
//			var FutureDate = 15;
//			var faraevent = "the NATE Show";
//			
//			Future0.setMonth(FutureMonth, FutureDate);
//			Future0.setFullYear(ThisYear);
//			
//			today1 = Date.parse(today);
//			future1 = Date.parse(Future0);
//			secleft = future1 - today1;
//			miliday = 24 * 60 * 60 * 1000;
//			daysleft = secleft/miliday;
//			daysleftint = Math.round(daysleft);
//			
//			if (daysleftint > 1)
//			$("#nate_count").html(daysleftint+ " days until "+ faraevent + "! ");
//			else if (daysleftint == 1)
//			$("#nate_count").html(faraevent+ " is tomorrow! ");
//			else if (today1 == future1)
//			$("#nate_count").html(faraevent+ " is today! ");
//			
//			// cross browser viewport measurement
//				 var viewportwidth;
//				 var viewportheight;
//				 
//			
//			//function viewportMeasure(){
//				 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
//				 
//				 if (typeof window.innerWidth != 'undefined')
//				 {
//					  viewportwidth = window.innerWidth,
//					  viewportheight = window.innerHeight
//				 }
//				 
//				// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
//				
//				 else if (typeof document.documentElement != 'undefined'
//					 && typeof document.documentElement.clientWidth !=
//					 'undefined' && document.documentElement.clientWidth != 0)
//				 {
//					   viewportwidth = document.documentElement.clientWidth,
//					   viewportheight = document.documentElement.clientHeight
//				 }
//				 
//				 // older versions of IE
//				 
//				 else
//				 {
//					   viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
//					   viewportheight = document.getElementsByTagName('body')[0].clientHeight
//				}
//				nateLocation = viewportheight-126;
//				jeapLocation = viewportheight-206
//				$("#nate_countdown").css("top", nateLocation).show();
//				$("#jeap_ad_wrap").css("top", jeapLocation).show();
//				$(window).scroll(function () { 
//					var offset = nateLocation+$(document).scrollTop();
//				   var jeapoffset=jeapLocation+$(document).scrollTop();
//					$("#nate_countdown").animate({top:offset},{duration:600,queue:false});
//					$("#jeap_ad_wrap ").animate({top:jeapoffset},{duration:600,queue:false});
//				});
				
//				$("#nate_countdown").click(function(){
//						window.open("http://www.natehome.com/ClassLibrary/Page/Information/DataInstances/425/Files/2895/NATE_2010_Pre_Show_Planner.pdf",'blank')
//				});

				$("#jeap_ad_wrap").click(function(){
						window.location="http://www.wirelessestimator.com/emergency/";
				});

/*				$("#nate_rotate").cycle({
						fx:'curtainX',
						timeout: 6500,
						delay: -4000,
						speed: 1500,
						sync: 0,
						before:        function(){$("#nate_count").hide()},  
						after:         function(curr, next, opts){
						var index = opts.currSlide;
								 if( index==1){$("#nate_count").show()}
							 }  
			 });
*/				
//			$("#jeap_rotate").cycle({
//						fx:'growY',
//						timeout: 3000,
//						delay: 1000,
//						speed: 2000,
//						sync: 0/*,
//						before:        function(){$("#nate_count").hide()},  
//						after:         function(curr, next, opts){
//						var index = opts.currSlide;
//								 if( index==1){$("#nate_count").show()}
//							 }  */
//			 });


	});	

});