	$(function(){
		$('.noThanks').bind('click', newsLetterPopUp);
		$('.close').live('click', newsLetterPopUp);
		
		/* search box hid and show text */
		$(".search").blur(function() {
			var tempValue = $(this).attr('tempVal');
			if($(this).val()==''){
				$(this).val(tempValue);
			}
		});
		$(".search").focus(function() {
			var tempValue = $(this).attr('tempVal');
			if($(this).val() == tempValue){
				$(this).val('');
			}
		});
	});
					
	
	
	function newsLetterPopUp(hide){
		var container = $('#newsLetter');
		if(hide == false){
			$('.newsLetter_Step2').show();
			$('.newsLetter_Step1').hide();
			container.center().show();
			$('#overlay').docWidth().show();
		}else{
			if(container.css('display') == 'block'){
				container.hide();
				$('#overlay').hide();
			}else{
				container.center().show();
				$('#overlay').docWidth().show();
			}
		}
	}
	
		
	
	
	
jQuery.fn.center = function () {
    this.css("position","absolute");
    this.css("top", (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop() + "px");
    this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px");
	this.css("z-index", 150);
    return this;
}

jQuery.fn.docWidth = function () {
    this.css("position","absolute");
    this.css("height", $(document).height()+ "px");
    this.css("width", $(document).width() + "px");
	this.css("z-index", 101);
    return this;
}
	
	
