// JScript File
function Load() {

//alert(navigator.userAgent.toLowerCase());
if (deviceHasFlash()){
window.onunload = function() {
     window["__flash__removeCallback"] = function (instance, name) {
     return;
     };
	 } 

	//$('#flash-reel #playerone').html(Section);
	$('#flash-reel #playertwo').flash(
        { 
          src: '/swf/player_two.swf',
          width: 766,
          height: 346,
          flashvars: { StrapCount:1,BackCount:1,WorkCount:7,ThePath: location.href }
        },
        { version: 8 }
    );


	$('.page-title').flash(
        { 
            src: '/flash/fonts/museo500v2.swf', 
            flashvars: { 
                css: [
                    '* {color:#434343;font-size:31;letter-spacing: -1;width:540px;leading: 4;margin-bottom:-3},'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {
		$(this).attr({style: 'padding:0;margin:4px 0 0 0px'})
            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));						
        }
    );	

	$('.subHeading').flash(
        { 
            src: '/flash/fonts/museo500v2.swf', 
            flashvars: { 
                css: [
                    '* {color:#434343;font-size:18;letter-spacing: -1;leading: 1;margin-bottom:-3},'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {
		$(this).attr({style: 'padding:0;margin:4px 0 0 0px'})
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<span>'+this.innerHTML+'</span>';
            var $alt = $(this.firstChild);
			htmlOptions.wmode = 'transparent';
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width() ;
            $alt.addClass('sifr-alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );	
		$('.right_pane h3').each(function(){
		$(this).attr({style: 'padding:0;margin:4px 0 0 0px'})
		$(this).flash(

			{ 
				src: '/flash/fonts/museo500v2.swf', 
				flashvars: { 
					css: [
						'* {letter-spacing: -1;color: #434343;font-size:22;margin:0;padding:0}'
					].join(' ')
				}
			},
			{ version: 7 },
			function(htmlOptions) {
				htmlOptions.flashvars.txt = this.innerHTML;
						this.innerHTML = '<span>'+this.innerHTML+'</span>';
				var $alt = $(this.firstChild);
				htmlOptions.wmode = 'transparent';
			  htmlOptions.height = $(this).height() + 10;
			 
				htmlOptions.width = $(this).width()+ 10;
							$alt.addClass('sifr-alt');
				$(this)
					.addClass('flash-replaced')
					.prepend($.fn.flash.transform(htmlOptions));
					this.innerHTML =='';						
			}
			
    	);}
		
    );	
		
		
	$('.right_pane h4').each(function(){
		$(this).attr({style: 'padding:0;margin:4px 0 0 0px'})
		$(this).flash(

			{ 
				src: '/flash/fonts/museo500v2.swf', 
				flashvars: { 
					css: [
						'* {letter-spacing: -1;color: #E45B0B;font-size:22;margin:0;padding:0}'
					].join(' ')
				}
			},
			{ version: 7 },
			function(htmlOptions) {
				htmlOptions.flashvars.txt = this.innerHTML;
						this.innerHTML = '<span>'+this.innerHTML+'</span>';
				var $alt = $(this.firstChild);
				htmlOptions.wmode = 'transparent';
			  htmlOptions.height = $(this).height() + 10;
			 
				htmlOptions.width = $(this).width()+ 10;
							$alt.addClass('sifr-alt');
				$(this)
					.addClass('flash-replaced')
					.prepend($.fn.flash.transform(htmlOptions));
					this.innerHTML =='';						
			}
			
    	);}
		
    );	
	
	
	
	
	
	
	





	
	
	
$('h5').flash(
        { 
            src: '/flash/fonts/museo500v2.swf', 
            flashvars: { 
                css: [
                    '* {color:#434343;font-size:17;letter-spacing: -1;leading: 1;},'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {
		$(this).attr({style: 'padding:0;margin:4px 0 0 0px'})
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<span>'+this.innerHTML+'</span>';
            var $alt = $(this.firstChild);
			htmlOptions.wmode = 'transparent';
            htmlOptions.height = height="20px";
            htmlOptions.width = $alt.width() ;
            $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))
}
