﻿/// General scripts for day to day running on site.
var Peach = {

    /// <summary> 
    /// Utilizes jQuery feature detection to return the Internet Explorer browser number.
    /// </summary> 
    GetIEVersion: function () {
        var $browser = 0;
        // The browser is IE 6 - 8.
        if (!jQuery.support.leadingWhitespace) {

            // IE 6 & 7.
            if (!jQuery.support.boxModel) {

                !jQuery.support.opacity && !window.XMLHttpRequest ? $browser = 6 : $browser = 7;
            }
            else {
                $browser = 8;
            }
        }
        return $browser;
    },
	
	startFlashAnimation: function() {
	//wrap this 'if' as to avoid swfobject [provided by design] looking for the div#id on any other page (avoids js errors)
	if (window.location.href.indexOf("fly-through-animation.aspx")) 
                {
                    swfobject.embedSWF("/Media/Flash/SM_tripleKirks_player_v2.swf", "flashKirksContent", "626", "362", "8","", {}, {}, {});
				}
	
	}	
		
	};


    

/// <summary> 
/// Launch the scripts when all elements are loaded in the DOM.
/// </summary>
jQuery(document).ready(function () {

    //Peach.GetIEVersion();
	Peach.startFlashAnimation();
	

});
