﻿
sfHover = function () {
    var cats = document.getElementById("my_categories");
    if (cats == null) return;
    var sfEls = cats.getElementsByTagName("LI");
    if (sfEls=null) return;
    for (var i = 0; i < sfEls.length; i++) {
        sfEls[i].onmouseover = function () {
            this.className += " sfhover";
        }
        sfEls[i].onmouseout = function () {
            this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

    if ('jQuery' == 'jQuery') { jQuery.noConflict(); }

    jQuery(document).ready(function () {

        try {
            jQuery(".popup_youtube").each(function(){
                this.href = this.href.replace(new RegExp("watch\\?v=", "i"), 'v/')
            });
 
            jQuery(".popup_youtube").fancybox({
                'padding': 0,
                'autoScale': false,
                'transitionIn': 'elastic',
                'transitionOut': 'elastic',
                'speedIn': 200,
                'speedOut': 200,
                'overlayOpacity': 0.8,
                'width': 640,
                'height': 385,
                'type': 'swf',
                'swf': {
                    'wmode': 'transparent',
                    'allowfullscreen': 'true'
                }
            });
        } catch (exception) { }

        try {
            jQuery(".popup_content").fancybox({
                'padding': 0,
                'autoScale': false,
                'transitionIn': 'elastic',
                'transitionOut': 'elastic',
                'speedIn': 200,
                'speedOut': 200,
                'overlayOpacity': 0.8,
                'hideOnContentClick': true
            });
        }
        catch (exception) { }

        try {
            jQuery(".popup_page").fancybox({
                'padding': 0,
                'autoScale': false,
                'transitionIn': 'elastic',
                'transitionOut': 'elastic',
                'speedIn': 200,
                'speedOut': 200,
                'overlayOpacity': 0.8,
                'hideOnContentClick': true,
                'type': 'iframe',
                'width': 800,
                'height': 600
            });
        }
        catch (exception) { }
    });

