// JScript File
function Load() {

//alert(navigator.userAgent.toLowerCase());
if (deviceHasFlash()){
window.onunload = function() {
     window["__flash__removeCallback"] = function (instance, name) {
     return;
     };
	 }

    var flashvars = { StrapCount: 11,
        BackCount: 11,
        WorkCount: 9,
        ThePath: location.href
    };
    var params = { menu: "false", wmode: "transparent" };
    var attributes = {};
    swfobject.embedSWF("/swf/player_two.swf", "playertwo", "766", "346", "7.0.0", "", flashvars, params, attributes);












    $('.spotlights h3').each(function(i) {
        var txt = this.innerHTML;
        this.innerHTML = "<span id='ff" + i + "'>" + this.innerHTML + "</span>";
        var $alt = $(this.firstChild).clone();
        $alt.removeAttr("id");
        $(this).append($alt);
        var height = height="60px";
        var width = $alt.width();
        $alt.addClass('sifr-alt');
        $(this).attr({ style: 'padding:0;margin:0 0 0 5px;min-height:55px;height:auto !important;height:55px;' })
		.mouseleave(function(event) { callExternalInterface("ff" + i, txt); });

        var flashvars = { css: escape("* {margin:0;margin-bottom:15px;letter-spacing: -1;leading:1.0em;color: #E45B0B;font-size:19} a:hover { color: #E45B0B; text-decoration: underline; }"), txt: escape(txt) };
        var params = { menu: "false", wmode: "transparent", SWLiveConnect: "true", allowScriptAccess: "always" };
        var attributes = { id: "ff" + i, name: "ff" + i };
        swfobject.embedSWF("/flash/fonts/museo500v2.swf", "ff" + i, width, height, "7.0.0", "", flashvars, params, attributes);
    }
    );
    function getMovieName(movieName) {
        if (navigator.appName.indexOf("Microsoft") != -1) { return window[movieName] }
        else { return document[movieName] }
    }
    function callExternalInterface(swfID, text) { getMovieName(swfID).callRedraw(text) }
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	


    $('.page-title').flash(
        {
            src: '/flash/fonts/museo500v2.swf',
            flashvars: {
                css: [
                    '* {color:#434343;font-size:31;test-align:right;letter-spacing: -1;width:540px;leading: 4;margin-bottom:-3},'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {
            $(this).attr({ style: 'padding:0;margin:4px 0 0 -4px' })
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<span>' + this.innerHTML + '</span>';
            var $alt = $(this.firstChild);
            htmlOptions.wmode = 'transparent';
            htmlOptions.height = $alt.height() + 10;
            htmlOptions.width = $alt.width() + 10;
            $alt.addClass('sifr-alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));
        }
    );





	}
	else{
		$("#flash-home a,#flash-reel a").click(function(e){
		e.preventDefault;
		return false
		})
		$("#blogTab").mouseover(function(event) {
			$('#feed-news').attr({ style: 'display:none' })
			$('#feed-blog').fadeIn('fast');
		})
		$("#newsTab").mouseover(function(event) {
				$('#feed-blog').attr({ style: 'display:none' })
				$('#feed-news').fadeIn('fast');
				})
	}
}
function deviceHasFlash(){
	//return false
	var _devicetype = navigator.userAgent.toLowerCase()
	return !((_devicetype.indexOf("win64") != -1) || (_devicetype.indexOf("iphone")!= -1)|| (_devicetype.indexOf("ipad")!= -1)|| (_devicetype.indexOf("ipod")!= -1))
}


