﻿// Functions specific to a site.
var i;
for (i in document.images) {
    if (document.images[i].src) {
        var imgSrc = document.images[i].src;
        if (imgSrc.substr(imgSrc.length-4) === '.png' || imgSrc.substr(imgSrc.length-4) === '.PNG') {
            document.images[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='crop',src='" + imgSrc + "')";
        }
    }
}

(function ($) {
    $(document).ready(function () {
        // Place document manipulation code here
        Cufon.replace('h1, h2, h3, .form-title, #subnav-title, .overview-title, .home #home-content h1 span');

        //	Superfish drop-down menus
        //		$('.main-nav ul.L1').superfish({
        //			delay: 500, // one second delay on mouseout
        //			animation: { opacity: 'show' }, // fade-in and slide-down animation
        //			speed: 'fast', // faster animation speed
        //			autoArrows: false,
        //			dropShadows: false
        //		}); 



    /*    $("a[rel]").overlay({
            expose: '#202020',
            history: true,
			closeOnClick: false
        }); */

        //  fancy box //

     /*   j$("a#contact-box").fancybox({
            'titleShow': false
        });*/

/*
        $("a.popup").fancybox({
            'speedIn': 600,
            'speedOut': 200,
            'padding': 40,
            'margin': 0,
            'width': 562,
            'height': 512,
            'centerOnScroll': true,
            'type': 'iframe',
            'showCloseButton': true,
            'enableEscapeButton': true,
            'overlayShow': true,
            'hideOnOverlayClick': false
        });
     
*/


		
		
	
	
		$("a.popup").fancybox({
			'speedIn': 600,
            'speedOut': 200,
            'padding': 40,
            'margin': 0,
            'width': 562,
            'height': 512,
            'centerOnScroll': true,
			'showCloseButton': true,
            'enableEscapeButton': true,
            'overlayShow': true,
            'hideOnOverlayClick': false,
			'type': 'iframe'
            
	});
	
	

	
        // /fancy box //

        $("#mainnavigation li").hover(function () {
            var e = this;
            $(e).stop().animate({ top: "-14px" }, 250, function () {
                $(e).animate({ top: "-10px" }, 250);
            });

        }, function () {
            var e = this;
            $(e).stop().animate({ top: "4px" }, 250, function () {
                $(e).animate({ top: "0px" }, 250);
            });
        });

    });
})(jQuery);
