/* Google Location Hack */
if (top.location != self.location) top.location = self.location;

/* Cufon Options */
Cufon.replace('h2.pagetitle,h1.post-baslik,.gallery h4,.sidebar-box h2,ul.tabNav a,#special ul li a,#mainMenu ul li,#moving_tab .tabs .item,#moving_tab #sidebartags a');

/* Fancybox Photo View */
$(document).ready(function() {
	$("a[rel=slideView]").fancybox({
		'opacity'	: true,
		'overlayShow'	: false
	});
	
	$("a#photoView").fancybox({'opacity': true,'overlayShow': false});
});



$(document).ready( function(){
	$('#flickr_badge_wrapper a').each(function(index){
		src = $(this).children("img").attr("src").replace("_s","");
		title = $(this).children("img").attr("title")
	$(this).attr('href',src).attr('rel','flickrPhoto');
	$(this).attr('title',title)
	$(this).fancybox({'opacity': true,'overlayShow': false,'titlePosition': 'inside'});
	//console.log(title);
	})
});

$(document).ready(function(){
	$('ul.tabNav a').click(function() {
		var curChildIndex = $(this).parent().prevAll().length + 1;
		$(this).parent().parent().children('.current').removeClass('current');
		$(this).parent().addClass('current');
		Cufon.replace("ul.tabNav li.current a");
		$(this).parent().parent().next('.tabContainer').children('.current').slideUp('fast',function() {
			Cufon.replace("ul.tabNav a");
			$(this).removeClass('current');
			$(this).parent().children('div:nth-child('+curChildIndex+')').slideDown('normal',function() {
				$(this).addClass('current');
			});
		});
		return false;								
	});
});











