



$(document).ready(function() {

//componenti facebook connect
$.getScript('http://static.ak.fbcdn.net/connect.php/js/FB.Share');
$.getScript('http://platform.twitter.com/widgets.js');
$.getScript('https://apis.google.com/js/plusone.js');
// fine componenti facebook connect
/*
//effetto lightbox
$("a[href$=.jpg],a[href$=.png],a[href$=.gif]").prettyPhoto({
allow_resize: false,

});*/



//link esterni
$("a").filter(function() {
    return this.hostname &&
           this.hostname.replace(/^www\./, '') !==
              location.hostname.replace(/^www\./, '');
}).each(function() {
   $(this).attr({
       target: "_blank",
       title: "Visit " + this.href + " (click to open in a new window)"
    });
});




//salto al contenuto
if((location.href!='http://www.kalibandulu.com')&&(location.href!='http://www.kalibandulu.com/')){
location.href='#titoloarticolo';
}


    //inizializza slideshow
    $('#myImageFlow').fadeTo("fast", 0.4);
    $('#myImageFlow').load('http://www.kalibandulu.com/script/immagini.php?categoria=1', function() {
        $('#myImageFlow').fadeTo("fast", 1);
        var instanceOne = new ImageFlow();
        instanceOne.init({
            ImageFlowID:'myImageFlow'
        });
    });
                                 
                                 








    $('#brandnew').live('click', function() {
		
        $('#myImageFlow').fadeTo("fast", 0.4);
        $('#myImageFlow').load('http://www.kalibandulu.com/script/immagini.php?categoria=1', function() {
            $('#myImageFlow').fadeTo("fast", 1);
            var instanceOne = new ImageFlow();
            instanceOne.init({
                ImageFlowID:'myImageFlow'
            });
        });
    });
	
	
	
    $('#jugglinfrom').live('click', function() {
		
        $('#myImageFlow').fadeTo("fast", 0.4);
        $('#myImageFlow').load('http://www.kalibandulu.com/script/immagini.php?categoria=5', function() {
            $('#myImageFlow').fadeTo("fast", 1);
            var instanceOne = new ImageFlow();
            instanceOne.init({
                ImageFlowID:'myImageFlow'
            });
        });
    });

});
