// Fancybox
jQuery.noConflict();

jQuery(function(){

	jQuery.fn.getTitle = function() {
		var arr = jQuery("a.fancybox");
		jQuery.each(arr, function() {
			var title = jQuery(this).children("img").attr("title");
			jQuery(this).attr('title',title);
		})
	}

	// Supported file extensions
	var thumbnails = 'a:has(img)[href$=".bmp"],a:has(img)[href$=".gif"],a:has(img)[href$=".jpg"],a:has(img)[href$=".jpeg"],a:has(img)[href$=".png"],a:has(img)[href$=".BMP"],a:has(img)[href$=".GIF"],a:has(img)[href$=".JPG"],a:has(img)[href$=".JPEG"],a:has(img)[href$=".PNG"]';


	jQuery(thumbnails).addClass("fancybox").attr("rel","fancybox").getTitle();

	jQuery("a.fancybox").fancybox({
		'imageScale': true,
		'padding': 10,
		'zoomOpacity': true,
		'zoomSpeedIn': 500,
		'zoomSpeedOut': 500,
		'zoomSpeedChange': 300,
		'overlayShow': true,
		'overlayColor': "#666666",
		'overlayOpacity': 0.3,
		'enableEscapeButton': true,
		'showCloseButton': true,
		'hideOnOverlayClick': true,
		'hideOnContentClick': false,
		'frameWidth':  560,
		'frameHeight':  340,
		'centerOnScroll': true
	});
 
});

// Follow Me
jQuery(document).ready(function(){
	jQuery("body").append("<div id=\"tfmBox\"></div>");
	jQuery("#tfmBox").css({'position' : 'fixed', 'top' : '151px', 'width' : '30px', 'height' : '119px', 'z-index' : '1000', 'cursor' : 'pointer', 'background' : '#cc0000 url(http://www.basvanderlans.nl/wp-content/plugins/twitter-follow-me-box/follow-me.png) no-repeat scroll left top', 'right' : '0'});
	jQuery("#tfmBox").click(function () { 
	  window.open('http://twitter.com/delans');
	});
});

