﻿var _scriptPath = getScriptPath();

document.write('<link rel="Stylesheet" type="text/css" href="' + _scriptPath + 'yoxview.css" />');
document.write('<link rel="Stylesheet" type="text/css" href="' + 'css/layout.css" />');
document.write('<link rel="Stylesheet" type="text/css" href="' + 'css/thumbnail.css" />');
document.write('<link rel="Stylesheet" type="text/css" href="' + 'css/contact.css" />');

function LoadScript( url )
{
        //alert('<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>');
	document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ;
}
LoadScript(_scriptPath + "jquery-latest.js");
LoadScript(_scriptPath + "interaction.js");
LoadScript("js/jquery.jplayer.min.js");
LoadScript(_scriptPath + "jquery.jsonp-1.0.4.min.js");
LoadScript(_scriptPath + "jquery.timers-1.2.min.js");
LoadScript(_scriptPath + "jquery.yoxview-1.1.min.js");


function getScriptPath()
{
    var scripts = document.getElementsByTagName("script");
    var regex = /(.*\/)loadScripts.*/i;
    for(var i=0; i<scripts.length; i++)
    {
        var currentScriptSrc = scripts[i].src;
        if (currentScriptSrc.match(regex))
        return currentScriptSrc.match(regex)[1];
    }
    
    return null;
}
