-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinc_body_script_services.php
executable file
·78 lines (69 loc) · 3.13 KB
/
inc_body_script_services.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!-- jQuery -->
<script src="js/jquery.min.js" async onload="startIt()"></script>
<!-- Bootstrap -->
<script src="js/bootstrap.min.js" async></script>
<!-- WOW -->
<!--<script src="js/wow.min.js" async onload="startWow()"></script>-->
<script type="text/javascript">
function startIt(lang="None"){
$("#menu_bio").click(function() { $('html, body').animate({scrollTop: $("#opt_bio").offset().top}, 1500); });
$("#menu_cons").click(function() { $('html, body').animate({scrollTop: $("#opt_cons").offset().top}, 1500); });
$("#menu_solu").click(function() { $('html, body').animate({scrollTop: $("#opt_solu").offset().top}, 1500); });
$("#menu_cont").click(function() { $('html, body').animate({scrollTop: $("#footer_contact").offset().top}, 1500); });
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
myObj = JSON.parse(this.responseText);
$("#menu_bio").text(myObj["about_title"]);
$("#menu_cons").text(myObj["services_title"]);
$("#menu_solu").text(myObj["methods_title"]);
$("#menu_cont").text(myObj["footer_contact"]);
$("#opt_cons").text(myObj["services_title"]);
$("#serv_develop_title").text(myObj["serv_develop_title"]);
$("#serv_develop_content").text(myObj["serv_develop_content"]);
$("#serv_consult_title").text(myObj["serv_consult_title"]);
$("#serv_consult_content").text(myObj["serv_consult_content"]);
$("#serv_research_title").text(myObj["serv_research_title"]);
$("#serv_research_content").text(myObj["serv_research_content"]);
/*
$("#opt_solu").text(myObj["methods_title"]);
$("#methods_os_title").text(myObj["methods_os_title"]);
$("#methods_os_content").text(myObj["methods_os_content"]);
$("#methods_light_title").text(myObj["methods_light_title"]);
$("#methods_light_content").text(myObj["methods_light_content"]);
$("#methods_agile_title").text(myObj["methods_agile_title"]);
$("#methods_agile_content").text(myObj["methods_agile_content"]);
$("#methods_dry_title").text(myObj["methods_dry_title"]);
$("#methods_dry_content").text(myObj["methods_dry_content"]);
$("#methods_continuous_title").text(myObj["methods_continuous_title"]);
$("#methods_continuous_content").text(myObj["methods_continuous_content"]);
$("#methods_love_title").text(myObj["methods_love_title"]);
$("#methods_love_content").text(myObj["methods_love_content"]);
*/
$("#footer_contact").text(myObj["footer_contact"]);
$("#footer_follow").text(myObj["footer_follow"]);
$("#footer_about").text(myObj["footer_about"]);
}
};
if(lang == "None"){
var language = window.navigator.userLanguage || window.navigator.language;
if(language.indexOf("pt") < 0){
xmlhttp.open("GET", "lang_en.txt", true);
}else{
xmlhttp.open("GET", "lang_pt.txt", true);
}
}
else if(lang == "PT"){
xmlhttp.open("GET", "lang_pt.txt", true);
}else{
xmlhttp.open("GET", "lang_en.txt", true);
}
xmlhttp.send();
}
function loadPT(){
startIt("PT");
}
function loadEN(){
startIt("EN");
}
</script>