jQuery(document).ready(function(){
    jQuery("a[rel^='fancyBox']").fancybox({
	    'transitionIn'		: 'elastic',
	    'transitionOut'		: 'elastic',
	    'titlePosition' 	: 'over',
	    'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
		    return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; &laquo;' + title + '&raquo;': '') + '</span>';
	    },
	    'onComplete'	:	function() {
		    jQuery("#fancybox-wrap").hover(function() {jQuery("#fancybox-title").show();}, function() {jQuery("#fancybox-title").hide();});
	    }
    });

    swfobject.embedSWF('/shared/flash/logo_3.swf', 'header_bg_id', "956", "150", "9.0.0", "/shared/js/common/swfobject/expressInstall.swf", false, {quality:"high",wmode:"transparent",menu:"false",bgcolor:"#000000"}, false);
    jQuery("#splash_bg_id a#flashstarter").click(function(){
        swfobject.embedSWF('/shared/flash/splash2.swf', 'splash_bg_id', "956", "649", "9.0.0", "/shared/js/common/swfobject/expressInstall.swf", false, {quality:"high",wmode:"transparent",menu:"false",bgcolor:"#000000"}, false);
        return false;
    });
});

function setCookie(name, value, expiredays, path, domain, secure) {
    if (expiredays) {
        var exdate=new Date();
        exdate.setDate(exdate.getDate()+expiredays);
        var expires = exdate.toGMTString();
    }
    document.cookie = name + "=" + escape(value) +
        ((expiredays) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}
function getCookie(name) {
    var cookie = " " + document.cookie;
    var search = " " + name + "=";
    var setStr = null;
    var offset = 0;
    var end = 0;
    if (cookie.length > 0) {
        offset = cookie.indexOf(search);
        if (offset != -1) {
            offset += search.length;
            end = cookie.indexOf(";", offset)
            if (end == -1) {
                end = cookie.length;
            }
            setStr = unescape(cookie.substring(offset, end));
        }
    }
    return setStr;
}
