$(function() {
	$("#overlay").overlay({ 

	        // start exposing when overlay starts to load 
	        onBeforeLoad: function() { 

	            // this line does the magic. it makes the background image sit on top of the mask 
	            this.getBackgroundImage().expose({color: '#fff'}); 
	        },  

	        // when overlay is closed take the expose instance and close it as well 
	        onClose: function() {
	            $.expose.close(); 
	        } 

	    });
	
	
	$('.news-single-link').children('a').click(function(){

		$('#overlay_content_inner').html('<div class="align-center" style="padding: 50px 0;"><img style="display: block; margin: 0 auto;" src="fileadmin/templates/main/images/overlay/loading.gif" alt="Loading.." /></div>');

		var api = $("#overlay").overlay();
		api.load();

		url = $(this).attr('href') + " #maincontent";

		$('#overlay_content_inner').load(url);

		
		return false;
	});
});

function blurLogin(val1,val2){

if($.trim($(val1).val())==''){
$(val1).val(val2);
};


}

function focusLogin(val){
$(val).val('')

}




