$(document).ready(function(){

//blend            
$(".coda-nav-left a, .coda-nav-right a, #prev, #next").blend();
$(".close").blend();
$(".button").blend();

//twitter box
$("a.statusbtn").hover(
function () {
$("div.tweet").fadeIn('fast');
}, 
function () {
$("div.tweet").fadeOut('fast');
}
);

//image preload
{
  var cache = [];
  // Arguments are image paths relative to the current page.
  $.preLoadImages = function() {
    var args_len = arguments.length;
    for (var i = args_len; i--;) {
      var cacheImage = document.createElement('img');
      cacheImage.src = arguments[i];
      cache.push(cacheImage);
    }
  }
}(jQuery)

//slide out
$('.slide-out-div').tabSlideOut({
tabHandle: '.handle',                     //class of the element that will become your tab
pathToTabImage: 'images/tabs/lefttab.gif', //path to the image for the tab //Optionally can be set using css
imageHeight: '120px',                     //height of tab image           //Optionally can be set using css
imageWidth: '32px',                       //width of tab image            //Optionally can be set using css
tabLocation: 'left',                      //side of screen where tab lives, top, right, bottom, or left
speed: 300,                               //speed of animation
action: 'click',                          //options: 'click' or 'hover', action to trigger animation
topPos: '200px',                          //position from the top/ use if tabLocation is left or right
fixedPosition: false                      //options: true makes it stick(fixed position) on scroll
});

$('.slide-out-div2').tabSlideOut({
tabHandle: '.handle2',                     //class of the element that will become your tab
pathToTabImage: 'images/tabs/righttab.gif', //path to the image for the tab //Optionally can be set using css
imageHeight: '120px',                     //height of tab image           //Optionally can be set using css
imageWidth: '32px',                       //width of tab image            //Optionally can be set using css
tabLocation: 'right',                      //side of screen where tab lives, top, right, bottom, or left
speed: 300,                               //speed of animation
action: 'click',                          //options: 'click' or 'hover', action to trigger animation
topPos: '200px',                          //position from the top/ use if tabLocation is left or right
fixedPosition: false                      //options: true makes it stick(fixed position) on scroll
});	

$('.slide-out-div3').tabSlideOut({
tabHandle: '.handle3',                     //class of the element that will become your tab
pathToTabImage: 'images/buttons/showhidebtn.gif', //path to the image for the tab //Optionally can be set using css
imageHeight: '35px',                     //height of tab image           //Optionally can be set using css
imageWidth: '136px',                       //width of tab image            //Optionally can be set using css
tabLocation: 'bottom',                      //side of screen where tab lives, top, right, bottom, or left
speed: 300,                               //speed of animation
action: 'click',                          //options: 'click' or 'hover', action to trigger animation
leftPos: '0px',                          //position from left/ use if tabLocation is bottom or top
onLoadSlideOut: true,                     
fixedPosition: false                      //options: true makes it stick(fixed position) on scroll
});

//cycle
$('#logosc').cycle({ 
fx: 'fade', 
speed: 1000
});

$('#projectslrgc').cycle({
fx: 'fade',
speed: 1000,
timeout: 8000,
pause: 1,
next: '#next', 
prev: '#prev' 
});

//shadowbox
Shadowbox.init({
fadeDuration: 0.8,
overlayOpacity: 1,
resizeDuration: 0.7 
});

//addthis
var addthis_config = {
ui_header_color: "#ffffff",
ui_header_background: "#000000",
ui_click: false
}

//google
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-6576650-4']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();


        $(".tweet").tweet({
            username: "GlowDigital",
			favorites: true,
            join_text: "auto",
            avatar_size: 0,
            count: 1,
            auto_join_text_default: "we said,", 
            auto_join_text_ed: "we",
            auto_join_text_ing: "we were",
            auto_join_text_reply: "we replied to",
            auto_join_text_url: "we were checking out",
			template: function(i){return i["text"]},
            loading_text: "loading tweets..."
        });            
});	

//expand
animatedcollapse.addDiv('menu', 'height=125px,fade=0,hide=1')
animatedcollapse.ontoggle=function($, divobj, state){}
animatedcollapse.init()

//end
