-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
129 lines (121 loc) · 5.37 KB
/
script.js
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
var adrsBar = document.getElementById('theme');
var screen = $('#screen');
screen.hide();
/*setTimeout(function(){
document.getElementById("preloader").style.display = "none";
document.getElementById("screen").style.display = "block";
},2000);*/
/*$(window).on("load", function() {
var preload = $('#preloader');
var screen = $('#screen');
preload.find('.logo').fadeOut(function(){
preload.fadeOut();
preload.style.transform = "scale(10)";
preload.style.display = "none";
preload.style.transition = "1s";
document.getElementById('screen').style.opacity = "1";
screen.fadeIn();
});
});*/
$(window).on("load", function() {
var preload = $('#preloader');
preload.find('.logo').fadeOut(function(){
preload.fadeOut();
screen.show();
});
});
$("title").ready(function(){$(".Facebook,.Support,.Youtube,.Information,.maps").hide();});
$(".icon1").click(function(){$(".Support").show();document.getElementById("icon1").style.transform = "scale(1.4)";window.scrollTo(0, 0);
adrsBar.setAttribute('content','#ff0000');
});
$(".icon2").click(function(){$(".Facebook").show();document.getElementById("icon2").style.transform = "scale(1.4)";window.scrollTo(0, 0);
adrsBar.setAttribute('content','#5000ca');
});
$(".icon3").click(function(){$(".Home").show();window.scrollTo(0, 0);
adrsBar.setAttribute('content','#ff0000');
});
$(".icon4").click(function(){$(".Youtube").show();document.getElementById("icon4").style.transform = "scale(1.4)";window.scrollTo(0, 0);
adrsBar.setAttribute('content','#ff0000');
});
$(".icon5").click(function(){$(".Information").show();document.getElementById("icon5").style.transform = "scale(1.4)";window.scrollTo(0, 0);
adrsBar.setAttribute('content','#ff0000');
});
$(".direction").click(function(){$(".maps").slideToggle(100);});
$(".icon1,.icon2,.icon3,.icon4").click(function(){
$(".Information").hide();
document.getElementById("icon5").style.transform = "scale(1)";
});
$(".icon1,.icon2,.icon3,.icon5").click(function(){
$(".Youtube").hide();
document.getElementById("icon4").style.transform = "scale(1)";
});
$(".icon1,.icon2,.icon4,.icon5").click(function(){
$(".Home").hide();
});
$(".icon1,.icon3,.icon4,.icon5").click(function(){
$(".Facebook").hide();
document.getElementById("icon2").style.transform = "scale(1)";
});
$(".icon2,.icon3,.icon4,.icon5").click(function(){
$(".Support").hide();
document.getElementById("icon1").style.transform = "scale(1)";
});
var reqURL = "https://api.rss2json.com/v1/api.json?rss_url=" + encodeURIComponent("https://www.youtube.com/feeds/videos.xml?channel_id=");
function loadVideo(iframe) {
$.getJSON(reqURL + iframe.getAttribute('cid') + "&api_key=8bwwlljmtoiscsogior2ydu7phfapwa1hvwvkxkr&order_by=pubDate&order_dir=desc&count=27",
function(data) {
var videoNumber = (iframe.getAttribute('vnum') ? Number(iframe.getAttribute('vnum')) : 0);
var link = data.items[videoNumber].link;
id = link.substr(link.indexOf("=") + 1);
iframe.setAttribute("src", "https://youtube.com/embed/" + id + "?enablejsapi=1&controls=1&autoplay=1&modestbranding=1&fullscreen=1");
}
);
}
var iframes = document.getElementsByClassName('latestVideoEmbed');
for (var i = 0, len = iframes.length; i < len; i++) {
loadVideo(iframes[i]);
}
console.clear();
var tag = document.createElement("script");
tag.src = "//www.youtube.com/player_api";
var firstScriptTag = document.getElementsByTagName("script")[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
$(".bottom-nav").click(function(){
var i=0;
while(i<15){
$(".latestVideoEmbed")[i].contentWindow.postMessage('{"event":"command","func":"' + 'pauseVideo' + '","args":""}', '*');
i++;}
});
console.clear();
setTimeout(function(){ console.clear();}, 7500);
function sendmail(){
var name = $('#name').val();
var email = $('#email').val();
var subject = $('#topic').val();
var message = $('#Message').val();
var Body='Name: '+name+'<br>Email: '+email+'<br>Subject: '+subject+'<br>Message: '+message+'<br>';
//console.log(name, phone, email, message);
Email.send({
SecureToken:"5a5b68a8-f001-4a96-b742-0d2ad7dc4733",
To: 'saininaman006@gmail.com',
From: email,
Subject: subject,
Body: Body
}).then(
message =>{
//console.log (message);
if(message=='OK'){
alert('Your mail has been send. Thanks for connecting to us.');
}
else{
console.error (message);
alert('There is error at sending message. ')
}}
);};
$(document).on('ready', function() {
$(".variable").slick({
dots: true,
infinite: true,
variableWidth: true
});
});