
$(function() {
	$('.c-pic a').lightBox(); 
});
$(function() {
c = 0;
l = $('.ads').length;
$('.ads').hide();
$('.ads:eq('+(c)+')').show();
$('.ads:eq('+(c+1)+')').show();
$('.ads:eq('+(c+2)+')').show();
$('.adsnext').click(function(){
if(  (c+5)<l  ){
c = c+3;
$('.ads').hide();
$('.ads:eq('+(c)+')').show();
$('.ads:eq('+(c+1)+')').show();
$('.ads:eq('+(c+2)+')').show();
$('.ads').css('width','33%');
}
});
$('.adsprev').click(function(){
if(c!=0){
c = c-3;
$('.ads').hide();
$('.ads:eq('+(c)+')').show();
$('.ads:eq('+(c+1)+')').show();
$('.ads:eq('+(c+2)+')').show();
$('.ads').css('width','33%');
}
});
    $(".jCarouselLite").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev"
    });
});


$(document).ready(function(){


$(".intro_tree>li").hover(
function(){
$(this).find('.itoparrow').fadeIn(100);

$(this).find('.itoparrow').hover(function(){$(this).attr('src','/images/arrow.png');},function(){$(this).attr('src','/images/arrow_h.png');});

},function(){
$(this).find('.itoparrow').fadeOut(100);
}
);


$('body').click(function(){

});

$('.itoparrow').click(function(event){
     event.stopPropagation();
});


$("a.starter").click(function(){

$(this).parent().animate({
height:'400px'
},300,function(){
$('a.starter').fadeOut(500);
$('.intro_tree').fadeIn(500);
$(this).css('height','auto');
});

});



$(".intro_tree li .itoparrow").click(function(){


$(".intro_tree").find('.submenu').fadeOut(200);

p = $(this).parent().find('.itoparrow').position();


$(this).parent().find('.submenu').fadeIn(200);
if(p.left > 200) {
$(this).parent().find('.submenu').css('width',p.left+'px');
}else{
$(this).parent().find('.submenu').css('width',200+'px');
}
$(this).parent().addClass('bordered');



});


$(".intro_tree span").click(function(){


$(".intro_tree").find('.submenu').fadeOut(200);


});


});








$(document).ready(function() {
	$().piroBox({
			my_speed: 400, 
			bg_alpha: 0.1, 
			slideShow : true,
			slideSpeed : 4,
			close_all : '.piro_close,.piro_overlay'

	});
});
