
 function scrollTopTo()
 {
	$('html,body').ainmate();
	var target = $("#header").offset().top;
	$('html,body').animate({scrollTop: target}, 700);
  }


function santa() 
{
    $('.santa').toggleClass('activeSanta');
    setTimeout('santa()',500);
}

$(document).ready(function(){
    santa();
addHandler();
$(".project_a").click(function(){
$content.fadeTo(100,0.1)
$loader.show();
$id = $(this).attr("name");
$lang = $("#language").text();
$.get("/ajax.php",{news_id:$id},function(data){
$content.html(data);
$content.fadeTo(100,1);
$loader.hide();
});
return false;
});


$content = $("#content");
$loader =  $(".loader");
$loader.hide();	
$(".hide").hide();


$(".navigation h3 a").click(function(){
$(this).toggleClass("opened");
$(this).parent().next().slideToggle("slow");
	$(".opened").not($(this)).parent().next().slideUp("fast");
	$(".opened").not($(this)).removeClass("opened");
 
 
return false;
});	

$(".navigation  a").hover(function(){
$(this).animate({"padding-left":"+=15"},250);
},function(){
$(this).animate({"padding-left":"-=15"},200)

});

/*
$(".page li a").click(function(){
$content.fadeTo(100,0.1)
$loader.show();
$cat = $(this).attr("href");
$lang = $("#language").text();
$.get("/ajax.php",{page_cat:$cat,lang:$lang},function(data){
$content.html(data);
$content.fadeTo(100,1);
$loader.hide();
});
return false;
});
*/
/*
$(".page_1 li a").click(function(){
$(".opened").not($(this).parent().parent().prev().children()).removeClass("opened").parent().next().slideUp("slow");

$content.fadeTo(100,0.1)
$loader.show();
$cat = $(this).attr("href");
$lang = $("#language").text();
if($cat>=1) {
$.get("/ajax.php",{spage:$cat,lang:$lang},function(data){
$content.html(data);
$content.fadeTo(100,1);
$loader.hide();
addHandler();
});
}
return false;	
});

*/

$(".page_2 li a").click(function(){

$content.fadeTo(100,0.1)
$loader.show();
$cat = $(this).attr("href");
$lang = $("#language").text();
$.get("/ajax.php",{p_page:$cat,lang:$lang},function(data){
$content.html(data);
$content.fadeTo(100,1);
$loader.hide();
addHandler();


});
return false;	
});


$(".design_p").click(function(){
$content.fadeTo(100,0.1)
$loader.show();
$cat = $(this).attr("href");
$lang = $("#language").text();
$.get("/ajax.php",{d_page:$cat,lang:$lang},function(data){
$content.html(data);
$content.fadeTo(100,1);
$loader.hide();
addHandler();
});

});

 /*
$(".project_p").click(function(){
$content.fadeTo(100,0.1)
$loader.show();
$cat = $(this).attr("href");
$lang = $("#language").text();
 
$.get("/ajax.php",{project:1,lang:$lang},function(data){
$content.html(data);
$content.fadeTo(100,1);
$loader.hide();
addHandler();
}); 
 
});*/


function addHandler()
{

$(".subpage_a").click(function(){
var holder = $(this).parent();
holder.slideUp("normal");
var id = $(this).attr("name");
$.get("/ajax.php",{sub_id:id},function(data){
holder.html(data);
holder.slideDown('fast');	
});
return false;
});


$(".design_a").click(function(){
var holder = $(this).parent();
holder.slideUp("normal");
var id = $(this).attr("name");
$.get("/ajax.php",{des_id:id},function(data){
holder.html(data);
holder.slideDown('normal');	
});
return false;
});


$(".news_a").click(function(){
var holder = $(this).parent();
holder.slideUp("normal");
var id = $(this).attr("name");
$.get("/ajax.php",{news_id:id},function(data){
holder.html(data);
holder.slideDown('normal');	
});
return false;
});


}



 

$(".more_porfolio").hover(function(){

$(this).stop().animate({"top":'+=3'},200) 

},function(){$(this).stop().animate({"top":'-=3'},200) 

});


$('.partner_images  a').hover(function(){
$this =$(this);
$this.fadeTo(1000,1);	
},function(){
$(this).fadeTo(1000,0.2);		
	});


$('.item_image img').hover(function(){
$this =$(this);
$this.fadeTo(1000,1);	
},function(){
$(this).fadeTo(1000,0.5);		
	});
	
	
$('.more_porfolio').hover(function(){
$this =$(this);
$this.prev().children('img').fadeTo(1000,1);	
},function(){
$(this).prev().children('img').fadeTo(1000,0.2);		
	});
	


});
