//drop down navigation with jquery
$(document).ready(function(){

    $("#subNav").hide();
    
    $(".subnav-parent").hover(function(){
        $(".sub_nav", this).animate({ opacity: 'show' }, 500);
    }, function(){
        $(".sub_nav", this).animate({ opacity: 'hide' }, 200);
    });
    
    
    /*$("#pageNav6").hover(function(){
        $("#subNav").animate({
            top: -75,
            opacity: 'show',
            height: 80
        }, 500);
    }, function(){
        $("#subNav").animate({
            top: 0,
            opacity: 'hide',
            height: 0
        }, 200);
    });*/
	
	/*
	$("#subNav_info").hide();
    $("#pageNav7").hover(function(){
        $("#subNav_info").animate({
            top: -50,
            opacity: 'show',
            height: 55
        }, 500);
    }, function(){
        $("#subNav_info").animate({
            top: 0,
            opacity: 'hide',
            height: 0
        }, 200);
    });
    */
	/*
	$("#subNavProx").hide();
    $("#pageNav4").hover(function(){
        $("#subNavProx").animate({
            top: -20,
            opacity: 'show',
            height: 80
        }, 300);
    }, function(){
        $("#subNavProx").animate({
            top: 0,
            opacity: 'hide',
            height: 0
        }, 150);
    });
    */
    $("a.fancyBoxImg").fancybox({
		'zoomSpeedIn':		350, 
		'zoomSpeedOut':	    300, 
		'overlayShow':		true,
		'overlayOpacity': 0.5,
		'overlayColor': '#000',
		'hideOnContentClick': true,
		'hideOnOverlayClick' : true,
		'centerOnScroll':true
	});
});


// JavaScript Document
function externalLinks(){
    if (!document.getElementsByTagName) 
        return;
    var anchors = document.getElementsByTagName("a");
    for (var i = 0; i < anchors.length; i++) {
        var anchor = anchors[i];
        if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") 
            anchor.target = "_blank";
    }
}

window.onload = externalLinks;

