Lambenstein
Registered
Може ли някой да ми каже защо след като си направих JavaScript Based темплейт като го отворя с браузъра докато ми зарежда ме прехвъря на гугъл.ком
Благодаря предварително
Благодаря предварително
Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
//----Include-Function----
function include(url){
document.write('<script src="'+ url + '" type="text/javascript"></script>');
}
//--------global-------------
var isSplash = true;
var isIcon = true;
var isOver = false;
var MSIE = ($.browser.msie) && ($.browser.version <= 8)
//------DocReady-------------
$(document).ready(function(){
if(location.hash.length == 0){
location.hash="!/"+$('#content > ul > li:first-child').attr('id');
}
$('ul#menu').superfish({
delay: 800,
animation: {height:'show'},
speed: 400,
autoArrows: false,
dropShadows: false,
onInit: function(){
$("#menu > li > a").each(function(index){
var conText = $(this).find('.mText').text();
$(this).find('.textHold').append("<div class='mTextOver'>"+conText+"</div><div class='area'></div>")
})
}
});
if(!MSIE){
if(navigator.vendor == 'Apple Computer, Inc.'){
$('.bgPic').html("<img src='media/source.jpg' alt=''>")
}else{
$('.bgPic').html(
"<video width='1520' height='636' loop autoplay poster='media/source.jpg'><source src='media/source.mp4'><source src='media/source.ogv' type='video/ogg; codecs='theora, vorbis''><source src='media/source.webm' type='video/webm; codecs='vp8, vorbis''><img src='media/source.jpg' alt></video>"
)
}
}else{
$('.bgPic').html("<img src='media/source.jpg' alt=''>")
}
});
//------WinLoad-------------
$(window).load(function(){
$(".followHolder > ul > li > a").hoverSprite({onLoadWebSite: true});
$('.more').sprites({method:'gStretch',hover:true});
$('.pic').fancybox({'titlePosition': 'inside', 'overlayColor':'#000'});
$('.scroll1').cScroll({
duration:700,
step:100,
trackCl:'track',
shuttleCl:'shuttle',
hoverIn: function(_shuttle){
_shuttle.css({'backgroundPosition':'50% 100%'});
},
hoverOut: function (_shuttle){
_shuttle.css({'backgroundPosition':'50% 0%'});
}
})
$('.scroll2').cScroll({
duration:700,
step:100,
trackCl:'track2',
shuttleCl:'shuttle2',
hoverIn: function(_shuttle){
_shuttle.css({'backgroundPosition':'50% 100%'});
},
hoverOut: function (_shuttle){
_shuttle.css({'backgroundPosition':'50% 0%'});
}
})
$('.scroll3').cScroll({
duration:700,
step:100,
trackCl:'track3',
shuttleCl:'shuttle3',
hoverIn: function(_shuttle){
_shuttle.css({'backgroundPosition':'50% 100%'});
},
hoverOut: function (_shuttle){
_shuttle.css({'backgroundPosition':'50% 0%'});
}
})
if(!MSIE){ $('.pic').find(".zoomSp").fadeTo(500, 0)}else{ $('.pic').find(".zoomSp").css({"display":"none"}) }
$('.pic').hover(function(){
if(!MSIE){
$(this).find(".zoomSp").stop().fadeTo(500, 1)
}else{
$(this).find(".zoomSp").css({"display":"block"})
}
},
function(){
if(!MSIE){
$(this).find(".zoomSp").stop().fadeTo(500, 0)
}else{
$(this).find(".zoomSp").css({"display":"none"})
}
}
)
if(!MSIE){ $('.enterBtn').find('.overBtn').stop().animate({opacity:0}, 1,'easeOutCirc');}else{$('.enterBtn').find('.overBtn').css({"display":"none"});}
$('.enterBtn a').hover(
function(){
$(this).find('span').stop().animate({color:"#fff"}, 1000,'easeOutCirc');
if(!MSIE){
$(this).parent().find('.outBtn').stop().animate({opacity:0}, 500,'easeOutCirc');
$(this).parent().find('.overBtn').stop().animate({opacity:1}, 500,'easeOutCirc');
}else{
$(this).parent().find('.outBtn').css({"display":"none"});
$(this).parent().find('.overBtn').css({"display":"block"});
}
},
function(){
$(this).find('span').stop().animate({color:"#2F34FC"}, 1000,'easeOutCirc');
if(!MSIE){
$(this).parent().find('.outBtn').stop().animate({opacity:1}, 500,'easeOutCirc');
$(this).parent().find('.overBtn').stop().animate({opacity:0}, 500,'easeOutCirc');
}else{
$(this).parent().find('.outBtn').css({"display":"block"});
$(this).parent().find('.overBtn').css({"display":"none"});
}
}
)
$('._list5 > li').hover(
function(){
$(this).find('a').stop().animate({color:"#2e3469", "margin-left":"34px"}, 500,'easeOutCirc');
},
function(){
$(this).find('a').stop().animate({color:"#fff", "margin-left":"24px"}, 500,'easeOutCirc');
}
)
var menuItems = $('#menu >li');
var currentIm = 0;
var lastIm = 0;
navInit();
function navInit(){}
///////////////////////////////////////////////
var navItems = $('.menu > ul >li');
$('.menu > ul >li').eq(0).css({'display':'none'});
var content=$('#content'),
nav=$('.menu');
$('#content').tabs({
preFu:function(_){
_.li.css({left:"-1700px",'display':'none'});
}
,actFu:function(_){
if(_.curr){
_.curr.css({'display':'block',left:"-1700px"}).stop().delay(100).animate({left:"0px"}, 800,'easeOutCirc');
if ((_.n == 0) && ((_.pren>0) || (_.pren==undefined))){splashMode();}
if (((_.pren == 0) || (_.pren == undefined)) && (_.n>0) ){contentMode(); }
}
if(_.prev){
_.prev.stop().animate({left:'1700px'},450,'easeInCubic', function(){_.prev.css({'display':'none'});});
}
}
})
function splashMode(){
isSplash = true;
$("header").stop(true).delay(200).animate({top:"320px"}, 500, 'easeOutCirc');
$(".bgPic").stop(true).delay(300).animate({top:"20px"}, 500, 'easeOutCirc');
$(".menu").stop(true).delay(1).animate({right:"-1000px"}, 500, 'easeInSine');
}
function contentMode(){
isSplash = false;
$("header").stop(true).delay(1).animate({top:"0px"}, 500, 'easeInOutCirc');
$(".bgPic").stop(true).delay(100).animate({top:"-295px"}, 500, 'easeInOutCirc');
$(".menu").stop(true).delay(300).animate({right:"0px"}, 700, 'easeOutCirc');
}
nav.navs({
useHash:true,
hoverIn:function(li){
$(".mText", li).stop(true).animate({top:"60px"}, 400, 'easeOutExpo');
$(".mTextOver", li).stop(true).animate({top:"0px"}, 400, 'easeOutExpo');
$(".whDiv", li).stop(true).animate({top:"11px"}, 300, 'easeOutSine');
$(".overMarker", li).stop(true).animate({top:"0px"}, 300, 'easeOutSine');
// if(($.browser.msie) && ($.browser.version <= 8)){}else{}
},
hoverOut:function(li){
if ((!li.hasClass('with_ul')) || (!li.hasClass('sfHover'))) {
$(".mText", li).stop(true).animate({top:"0px"}, 400, 'easeOutBack');
$(".mTextOver", li).stop(true).animate({top:"-60px"}, 400, 'easeOutExpo');
$(".whDiv", li).stop(true).animate({top:"-10px"}, 400, 'easeOutExpo');
$(".overMarker", li).stop(true).animate({top:"-15px"}, 400, 'easeOutExpo');
}
}
})
.navs(function(n){
$('#content').tabs(n);
})
//////////////////////////////////////////
var h_cont=800;
function centrRepos() {
var h=$(window).height();
if (h>(h_cont+40)) {
m_top=~~(h-h_cont)/2;
h_new=h;
} else {
m_top=20;
h_new=h_cont+40;
}
$('.center').stop().animate({paddingTop:m_top},800,'easeOutExpo');
}
centrRepos();
///////////Window resize///////
function windowW() {
return (($(window).width()>=parseInt($('body').css('minWidth')))?$(window).width():parseInt($('body').css('minWidth')));
}
$(window).resize(function(){
centrRepos();
}
);
} //window function
) //window load