/* <![CDATA[ */
function blankTargetFix(){
  if(!document.getElementsByTagName){
    return;
  }

  var anchors = document.getElementsByTagName("a");

  for(var i = 0; i < anchors.length; i++){
    var anchor = anchors[i];

    if(anchor.getAttribute("href") && anchor.getAttribute("rel") == "external"){
      anchor.target = "_blank";
    }
  }
}

$(document).ready(function (){

	$(".gallery a span").ready(function(){
    $(".gallery a span").animate({opacity:"0.50",speed:"fast"});
	});
	
	$(".gallery a").hover(function() {
		$(this).find('span').addClass("hover").stop()
			.animate({
        opacity: '0.5'
        
			}, 1000);
		
		} , function() {
		$(this).find('span').removeClass("hover").stop()
			.animate({
        opacity: '1'
			}, 2000);
	});
	
	/* Pajinate Script */
	$('#category').pajinate({
		num_page_links_to_display : 8,
		items_per_page : 6
	});
	
	$('#testi').pajinate({
					start_page : 2,
					items_per_page : 4	
				});


				
			

	
  	$("body").ready(function(){
			$("body").animate({opacity:"0.2",speed:"fast"});
			$("body").animate({opacity:"1",speed:"fast"});
		});
/*Jquery Fancybox */ 
  $(".fancypic").fancybox({
    'titleShow'		: false,
    'transitionIn'	: 'elastic',
    'transitionOut'	: 'elastic'
  });
    });
/* ]]> */

var $j = jQuery.noConflict();

$j(document).ready(function(){

	//ADD target="_blank" TO ALL LINKS WITH rel="external"
	$j("a[rel='external']").attr("target","_blank");

});
