google.setOnLoadCallback(function() {
	if( jQuery( '#rotatingImages' ).length != 0 ) {
		new Blockster({
			holder: '#rotatingImages',
			rows: 2,
			cols: 12,
			pause: 6000,
			blockAnimSpeed: 25,
			startWithoutDelay: true
		});
		$( '#rotatingImages' ).css( 'visibility', 'visible' );
	}
});

$(document).ready(function() {
	$('a[href^="http"]').each( function() {
		$( this ).addClass( 'iframe' );
	});
	
	// Now we call fancybox and apply it on any link with a rel atribute that starts with "fancybox", with the options set on the admin panel ?>
	if( $("a.iframe").length > 0 ) {
		$("a.iframe").fancybox({
			'imageScale': true,
			'padding': 10,
			'zoomOpacity': true,
			'zoomSpeedIn': 1250,
			'zoomSpeedOut': 1250,
			'zoomSpeedChange': 1000,
			'overlayShow': true,
			'overlayColor': "#000",
			'overlayOpacity': 0.8,
			'enableEscapeButton': true,
			'showCloseButton': true,
			'hideOnOverlayClick': true,
			'hideOnContentClick': false,
			'width': '90%',
			'height': '90%',
			'type': 'iframe',
			'callbackOnStart': null,
			'callbackOnShow': null,
			'callbackOnClose': null,
			'centerOnScroll': true,
			'transitionIn': 'fade',
			'transitionOut': 'fade'
		});
	}

});
