// JavaScript Document


if (location.href=="http://www.nufase.com/#thanks")
{
	alert("Thanks, we'll be in touch!");
}

function UnCryptMailto( s )
{
	var n = 0;
	var r = "";
	for( var i = 0; i < s.length; i++)
	{
		n = s.charCodeAt( i );
		if( n >= 8364 )
	{
		n = 128;
	}
		r += String.fromCharCode( n - 1 );
	}
		return r;
	}
		function linkTo_UnCryptMailto( s )
	{
		location.href=UnCryptMailto( s );
}


var modalWindow = {  
    parent:"body",  
    windowId:null,  
    content:null,  
    width:null,  
    height:null,  
    close:function()  
    {  
        $(".modal-window").remove();  
        $(".modal-overlay").remove();  
    },  
    open:function()  
    {  
        var modal = "";  
        modal += "<div class=\"modal-overlay\"></div>";  
        modal += "<div id=\"" + this.windowId + "\" class=\"modal-window\" style=\"width:" + this.width + "px; height:" + this.height + "px; margin-top:-" + (this.height / 2) + "px; margin-left:-" + (this.width / 2) + "px;\">";  
        modal += this.content;  
        modal += "</div>";      
  
        $(this.parent).append(modal);  
  
        $(".modal-window").append("<a class=\"close-window\"></a>");  
        $(".close-window").click(function(){modalWindow.close();});  
        $(".modal-overlay").click(function(){modalWindow.close();});  
    }  
}; 

var openMyModal = function(source)  
{  
    modalWindow.windowId = "myModal";  
    modalWindow.width = 480;  
    modalWindow.height = 405;  
    modalWindow.content = "<p>test content</p>";  
    modalWindow.open();  
};  


$(document).ready(function () {


	$("div.readmore").hide();
	
	$("a.readmore").click(function() { 
	
		$(this).parent().next("div.readmore").fadeIn("slow");
	
	});
	
	$(".scrollButtons").hide();
	
	$(".showbacknext").click( function() {							
		$(".scrollButtons").fadeIn("slow");	
	});
	
	$(".hidebacknext").click( function() {							
		$(".scrollButtons").fadeOut("slow");	
	});
    
    $("img#scrollbuttonleft").hover(function() {
        $("img#scrollbuttonleft").attr("src", "/images/backOV.png");
    }, function() {
        $("img#scrollbuttonleft").attr("src", "/images/backUP.png");
    });
    
    $("img#scrollbuttonright").hover(function() {
        $("img#scrollbuttonright").attr("src", "/images/nextOV.png");
    }, function() {
        $("img#scrollbuttonright").attr("src", "/images/nextUP.png");
    });
    

});