// JavaScript Document
function isAndroid()
{ 
    return navigator.userAgent.match( /Android/i ) !== null; 

}//function isAndroid()

function isIE()
{ 
    return ( /MSIE (\d+\.\d+);/.test( navigator.userAgent ) );

}//function isIE()

function isIE7()
{
    if ( !isIE() ) return false;
    // Capture x.x portion and store as a number
    var ieVersion = new Number( RegExp.$1 ); 
    if ( ieVersion <= 7 ) return true;
    else return false;
    
}//function isIE7()

function isIE8()
{
    if ( !isIE() ) return false;
    // Capture x.x portion and store as a number
    var ieVersion = new Number( RegExp.$1 ); 
    if ( ieVersion <= 8 ) return true;
    else return false;
    
}//function isIE8()

function isIOS()
{ 
    return isIPhone() || isIPad() || isIPod(); 

}//function isIOS()

function isIPad()
{             
    return navigator.userAgent.match( /iPad/i ) !== null; 

}//function isIPad()

function isIPhone()
{             
    return navigator.userAgent.match( /iPhone/i ) !== null; 

}//function isIPhone()

function isIPod()
{            
    return navigator.userAgent.match( /iPod/i ) !== null; 

}//function isIPod()

function isMobile()
{
    return isAndroid() || isIOS();
    
}//function isMobile()

function startIpadMovie( width, height, videoUrl )
{
    if ( !isIPad() ) return;
    var html  = "<OBJECT classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width='" + width + "' height='" + height + "' codebase='http://www.apple.com/qtactivex/qtplugin.cab'>" +
                "<param name='src' value='" + videoUrl + "' />" +
                "<param name='href' value='" + videoUrl + "' />" +
                "<param name='autoplay' value='true' />" +
                "<param name='controller' value='false' />" +
                "<param name='loop' value='true' />" +
                "<param name='bgcolor' value='#fbe6e3' />" +
                "<EMBED src='" + videoUrl + "' href='" + videoUrl + "' width='" + width + "' height='" + height + "' autoplay='true' controller='false' loop='true' bgcolor='#fbe6e3' pluginspage='http://www.apple.com/quicktime/download/'></EMBED>" +
                "</OBJECT>";    
    $( '#video_ballerine' ).hide();
    $( '#video_ballerine_mov' ).html( html );
                
}//function startIpadMovie( width, height, videoUrl )
