File: /home/awaldron/_domains/_waldroninteractive.com/js/scripts.js
include('js/hoverSprite.js');
include('js/jquery.easing.1.3.js');
include('js/jquery-ui-1.8.11.custom.min.js');
include('js/jquery.transform-0.9.3.min.js');
include('js/jquery.animate-colors-min.js');
include('js/mathUtils.js');
include('js/superfish.js');
include('js/switcher.js');
include('js/jquery.mousewheel.js');
include('js/sprites.js');
include('js/forms.js');
include('js/slider.js');
include('js/jquery.backgroundpos.min.js');
include('js/jquery.fancybox-1.3.4.pack.js');
include('js/jcarousellite_1.0.1.min.js');
include('js/googleMap.js');
//----Include-Function----
function include(url){
document.write('<script src="'+ url + '" type="text/javascript" ></script>');
}
//--------global-------------
var isSplash = true;
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: {opacity:'show'},
speed: 200,
autoArrows: false,
dropShadows: false,
onInit: function(){
$("#menu > li > a").each(function(index){
var conText = $(this).find('.mText1').text();
$(this).find('.extraHolder').append("<span class='mTextOver'>"+conText+"</span>")
})
}
});
});
//------WinLoad-------------
$(window).load(function(){
////////////////////////////////////////////////////////////////
$('.more').sprites({method:'gStretch',hover:true});
$(".followHolder > ul > li > a").hoverSprite({onLoadWebSite: true});
$("._list2 > li > a").hoverSprite({onLoadWebSite: true});
$(".scrButn > a").hoverSprite({onLoadWebSite: true});
$("#jcarousel_1").jCarouselLite({
btnNext: ".nextBtn",
btnPrev: ".prevBtn",
speed: 800,
visible: 3
});
$('#jcarousel_1 li .pic').fancybox({'titlePosition': 'inside', 'overlayColor':'#000'});
$('.zoomSp').fadeTo(500, 0.2)
$('.zoomSp').hover(function(){ $(this).stop().fadeTo(500, 1) }, function(){$(this).stop().fadeTo(500, 0.2)})
navInit();
function navInit(){
}
///////////////////////////////////////////////
var navItems = $('.menu > ul >li');
var _delay;
$('.menu > ul >li').eq(0).css({'display':'none'});
var content=$('#content'),
nav=$('.menu');
$('#content').tabs({
preFu:function(_){
_.li.css({left:"1700px"})
}
,actFu:function(_){
if(_.curr){
_.curr.css({left:"1700px"}).stop().delay(200).animate({left:"0px"},800,'easeInOutCubic');
if ((_.n == 0) && ((_.pren>0) || (_.pren==undefined))){splashMode();}
if (((_.pren == 0) || (_.pren == undefined)) && (_.n>0) ){contentMode(); }
}
if(_.prev){
_.prev.stop().animate({left:"-1700px"},800,'easeInOutCubic');
}
}
})
function splashMode(){
isSplash = true;
navItems.each( function(index){
_delay = index*50;
navItems.eq(index).find('.imgHolder').stop().delay(_delay).animate({height:"258px"}, 700, 'easeInOutCubic');
} );
}
function contentMode(){
isSplash = false;
navItems.each( function(index){
_delay = index*50;
navItems.eq(index).find('.imgHolder').stop().delay(_delay).animate({height:"0px"}, 700, 'easeInOutCubic');
} );
}
nav.navs({
useHash:true,
hoverIn:function(li){
// if (!li.hasClass('active')){
$(".mText1", li).stop().animate({'bottom':'82px'}, 400, 'easeOutExpo');
$(".mTextOver", li).stop().animate({'bottom':'-2px'},600,'easeOutBack');
if(!MSIE){
$(".mOver", li).stop().animate({'backgroundPosition':'0 100%'},400,'easeOutExpo');
}else{
$(".mOver", li).css({'backgroundPosition':'0 100%'});
}
},
hoverOut:function(li){
if ((!li.hasClass('with_ul')) || (!li.hasClass('sfHover'))) {
$(".mText1", li).stop().animate({'bottom':'0px'}, 600, 'easeOutBack');
$(".mTextOver", li).stop().animate({'bottom':'-82px'},400,'easeOutExpo');
if(!MSIE){
$(".mOver", li).stop().animate({'backgroundPosition':'0 0%'},400,'easeOutExpo');
}else{
$(".mOver", li).css({'backgroundPosition':'0 0%'});
}
}
}
})
.navs(function(n){
$('#content').tabs(n);
})
///////////Resize////////////////////
//////////////////////////////////////////
var h_cont=830;
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');
//$('.main').css({height:h_new});
}
centrRepos();
///////////Window resize///////
$(window).resize(function(){
centrRepos()
}
);
} //window function
) //window load