$(document).ready(function()
{
$(".EmailFriendMessage").css('display','none');
$(".EmailFriend").css('display','none');


    $(".POEmail").click(function()
    {
       $(".EmailFriend").fadeIn('slow');
       $(".EmailFriendOuter").fadeIn('slow');
       $(".EmailFriendOuter").css({"background-color":"#ccc","height":"100%","width":"100%","opacity":"0.80","filter":"Alpha(Opacity=80)"});
    });
    
    $(".SendCancel").click(function()
    {
       $(".EmailFriend").fadeOut('slow');
    });
    
    $(".EmailFriendMessage").click(function()
    {
       $(".EmailFriendMessage").fadeOut('slow');
    });
});

 var textZoom = 3;
    
    function textResize(Direction)
    {
        $('*').each(function()
		    {
			    var ourText = $(this);
			    var currFontSize = ourText.css('fontSize');
			    //alert(currFontSize);
			    var finalNum = parseFloat(currFontSize, 10);
			    var stringEnding = currFontSize.slice(-2);
			    
			    if ((finalNum == 'NaN') || (finalNum > 40))
			    {
			     finalNum = 12;
			    }
			    
			    //alert(finalNum);

                if (Direction == 'Up')
                {
                    if (stringEnding == 'px')
                    {
                        finalNum += 2;
                    }
                    else if (stringEnding == 'em')
                    {
                        finalNum += 0.1;
                    }
				}
				else
                {
                    if (finalNum <= 8)
		    {
			finalNum = 10;
		    }
                
                    if (stringEnding == 'px')
                    {
                        finalNum -= 2;
                    }
                    else if (stringEnding == 'em')
                    {
                        finalNum -= 0.1;
                    }
				}
			    ourText.animate({fontSize: finalNum + stringEnding},"fast");
        });
    }
    
    $(function(){
		$('.POResizeUp').click(function()
		{
		    textZoom += 1;
		    if (textZoom <= 5)
		    {
		        textResize('Up');   
		    }
		    else
		    {
		        textZoom -= 1;
		    }
		});
		
        $('.POResizeDown').click(function()
		{
		    textZoom -= 1;
		    if (textZoom >= 1)
		    {
                textResize('Down');  
		    }
		    else
		    {
		        textZoom += 1;
		    }
		});
	});

function printpr()
{
     if (document.getElementById("printLink") != null)
    {
        var headID = document.getElementsByTagName("head")[0];        
        var cssNode = document.createElement('link'); 
        cssNode.type = 'text/css';
        cssNode.rel = 'stylesheet';
        cssNode.href = llRootloc + '/mainwebsite/include/Print.css';
        cssNode.media = 'screen';
        cssNode.id = "printLinkScreen";
        headID.appendChild(cssNode); 
    } 
    else 
    {
        var cssNodeOld = document.getElementById("printLink");
        if (cssNodeOld.href == "")
        {
            cssNodeOld.href = llRootloc + '/mainwebsite/include/Print.css';            
        }
        cssNodeOld.media = 'print';

    } 
}

$(document).ready(function(){
$("a.HypBookmark").click(function(e){
	e.preventDefault(); // this will prevent the anchor tag from going the user off to the link
	var bookmarkUrl = this.href;
	var bookmarkTitle = this.title;
 
	if (window.sidebar) { // For Mozilla Firefox Bookmark
		window.sidebar.addPanel(bookmarkTitle, bookmarkUrl,"");
	} else if( window.external || document.all) { // For IE Favorite
		window.external.AddFavorite( bookmarkUrl, bookmarkTitle);
	} else if(window.opera) { // For Opera Browsers
		$("a.HypBookmark").attr("href",bookmarkUrl);
		$("a.HypBookmark").attr("title",bookmarkTitle);
		$("a.HypBookmark").attr("rel","sidebar");
	} else { // for other browsers which does not support
		 alert('Your browser does not support this bookmark action');
		 return false;
	}
});
});