
$(document).ready(function() {


	
	$("a#single_image").fancybox();
	


	$(".prodpic a").fancybox({
		'speedIn'		:	200, 
		'speedOut'		:	200, 
		'autoScale'		: true,
		//'autoDimensions': true,
		'overlayColor'  : '#000',
		'overlayOpacity': 0.9,
		'overlayShow'	: true,
		'showCloseButton' : false,
	});
	
	$("a.gallerylink").fancybox({
		'speedIn'		:	200, 
		'speedOut'		:	200, 
		'showNavArrows'	: true,
		'hideOnContentClick': true,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'autoScale'		: true,
		'overlayColor'  : '#000',
		'overlayOpacity': 0.9,
		'overlayShow'	: true,
		'showCloseButton' : false,
		'titleFormat' : function() {return '<div id="fancybox-title-main" style="text-align:right;">'+this.title+'</div>';},
	});
	


//$("#fancybox-title-main h1").click(function(){alert("puhu");});


var newmyurl = window.location.pathname;

//var myurl2 = myurl1.pop();

$(".view-teammenu1 .view-content a[href$='"+newmyurl+"']").css({color:'#000000'});

$(".view-teammenu1 .view-content a[href$='"+newmyurl+"']").parent().css({backgroundColor:'#0CBFF2', color:'#000000'});

$("#block-tagadelic-2 a[href$='"+newmyurl+"']").css({color:'#0CBFF2'});

$("#prodtags a[href$='"+newmyurl+"']").parent().css({backgroundColor:'#0CBFF2', color:'#000000'});


var xxx = window.location.pathname;
if(xxx.indexOf("blog")!=-1){	
$('#primary li a[href*="blog"]').css({color:'#0CBFF2'});

};
var xxx2 = window.location.pathname;
//console.log(xxx2.indexOf("team"));
if(xxx2.indexOf("team")== 1){	
$('#primary li a[href*="team"]').css({color:'#0CBFF2'});
};



$(".media").hover(function(){$(this).children("div.medialinkpic").hide()},function(){$(this).children("div.medialinkpic").show();});



 $("#topictags2 div.tagsfx").hover(function(){$(this).addClass('tagsfxhover');},function(){$(this).removeClass('tagsfxhover');});
  $("a.tagadelic").hover(function(){$(this).addClass('tagsfxhover');},function(){$(this).removeClass('tagsfxhover');});
 $(".view-teammenu1 .view-content div").hover(function(){$(this).addClass('tagsfxhover');},function(){$(this).removeClass('tagsfxhover');});
$('#block-menu-menu-teamrider2 ul.menu li').hover(function(){$(this).addClass('tagsfxhover');},function(){$(this).removeClass('tagsfxhover');});


 $('div.tagsfx').click(
        function()
        {
       
            window.location = $(this).children('a:first').attr("href");
            return false;
        }
       ); 
$('#block-menu-menu-teamrider2 ul.menu li').click(
        function()
        {
       
            window.location = $(this).children('a:first').attr("href");
            return false;
        }
       ); 


$('.view-teammenu1 .view-content div').click(
        function()
        {
       
            window.location = $(this).children('a:first').attr("href");
            return false;
        }
       ); 
       
    
       
});

