﻿

$(document).ready(function() {
    var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);
	var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);

	if (!ie55 && !ie6) {
        $('h1,h2,h3,h4').each(function(index, el) {
            var e = $(el);
            var t = el.innerHTML.replace(/^\s+/,'').replace(/\s+$/,'');
            var c = escape(e.css('color'));
            var s =  escape(e.css('font-size'));
            var trans =  escape(e.css('text-transform'));
            var fw =  escape(e.css('font-weight'));
            var className =  el.nodeName.toLowerCase();        
            if(el.className)
            {
                className += el.className;
            }
            var s = '<img class="' + className + '" src="Text.axd?t=' + t + '&v=1&x=~/src/xml/arialn.xml&o2=' + s + '&o3=' + fw + '&o4=' + c + '&o5=' + trans + '" alt="' + t + '" title="' + t + '" />';
            
            e.replaceWith(s);
        });
    }
    else 
    {
        $('h1,h2,h3,h4').css('visibility', 'visible');
    }
    
    
    if( $('#photos').length > 0 ){
        $('#photos').galleryView({
            panel_width: 750,
            panel_height: 490,
            frame_width: 100,
            frame_height: 100                       
        });
    }
});


