var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-20659978-1']);
_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);
})();

$(window).load(function () {
    var completeTime = new Date();
    var diff = (completeTime - startTime)/1000 ;
    $('#footertext').append('<br />pagina geladen in ' + diff + " seconden");
});

$(document).ready(function(){
    $("#fb-like").append('<fb:like-box href="http://www.facebook.com/IT.Street" width="300" show_faces="false" stream="false" colorscheme="dark" header="false"></fb:like-box>');
    $("#gplus").append('<g:plusone></g:plusone>');

    $("a").filter(function() {
        return this.hostname && this.hostname.replace("www.", "") != location.hostname.replace("www.", "");
    }).click(function() {
        window.open($(this).attr("href"));
        return false;
    });

    // main vertical scroll
    $("#main").scrollable({
 
        // basic settings
        vertical: true,
 
        // up/down keys will always control this scrollable
        keyboard: 'static',
 
        // assign left/right keys to the actively viewed scrollable
        onSeek: function(event, i) {
            horizontal.eq(i).data("scrollable").focus();
        }
 
    // main navigator (thumbnail images)
    }).navigator("#main_navi");
 
    // horizontal scrollables. each one is circular and has its own navigator instance
    var horizontal = $(".scrollable").scrollable({ circular: true }).navigator(".navi");
 
 
    // when page loads setup keyboard focus on the first horzontal scrollable
    horizontal.eq(0).data("scrollable").focus();
});

