
$(document).ready(function() {
	//width for box_dogs	
	function setWidth(){
		w=$(window).width();	
		if (w<=1440) { 
			if (w<=960) {
				$('.box_dogs').css({width:960})
			} else {
				$('.box_dogs').css({width:w})
			}
		} else {
			$('.box_dogs').css({width:'100%'})
		}
	}
	setWidth();
	setInterval(setNew,1);
	function setNew(){
		new_w=$(window).width();
		if (w!=new_w) {
			w=new_w;
			setWidth();
		}
	}
	
	// for lightbox
	if ($("a[rel^='prettyPhoto']").length) {
			$(document).ready(function() {
				// prettyPhoto
				$("a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_square'});
			});
		}
	//for button_close
	$('.close .active').css({opacity:'0', display:'none'})
	$('.close').hover(function(){
			$('.close .active').css({display:'block'}).stop().animate({opacity:'1'}, 300)				  
		}, function(){
			$('.close .active').stop().animate({opacity:'0'}, 300, function(){$(this).css({display:'none'})})		
		}
	)	
	//for banners
	$('.banners li a').hover(function(){
			$(this).find('img').css({visibility:'hidden'});
			$(this).find('.img').css({visibility:'visible'});
			$(this).find('.img').stop().animate({width:'130%', height:'130%', top:'-15%', left:'-15%'},400);					  
		}, function(){
			$(this).find('.img').stop().animate({width:'100%', height:'100%', top:'0%', left:'0%'},400);
		}
	)
 });
