
$(document).ready(function() {
	$("a[rel=slides]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return //'<span id="fancybox-title-over"> Product ' +productTitel+ (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
									}
	});
	
});
function get_object(id) 
{
	var object = null;
	if (document.layers) 
	{   
		object = document.layers[id];
	} else if (document.all)
	{
		object = document.all[id];
	}else if (document.getElementById) 
	{
		object = document.getElementById(id);
	}
    return object;
}
	function mouseOverPattern(id){
         get_object('pat'+id).style.display='';
                    
                    //alert(document.getElementById('tabmenu'+id).style.width);
     }
	function mouseOutPattern(id){
		get_object('pat'+id).style.display='none';
		//document.getElementById('tabmenu<php echo $rs_menu[$i]["WebID"]?>').style.display='none';

	}
$( function () {
	$("div#leftControl, div#rightControl").hover( function () {
			$side = $(this).attr('id');
			$timer = setInterval( function () {

			if($side == 'leftControl') {
				$scroll = $("div#fotos").scrollLeft() - 20;
			} else {
				$scroll = $("div#fotos").scrollLeft() + 20;
			}

			$("div#fotos").scrollLeft( $scroll );

		}, 50);

	}, function () {
		clearInterval( $timer );
});
	
	
});

$(document).ready(function() { 
	
	if($("#menu").width() > 646)
	{
		$("#taalmenu").addClass("taalmG");
		
	}
	else
	{
		$("#taalmenu").removeClass("taalmG")
	}
});

function clickclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
		thisfield.value = "";
	}
}

function clickrecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
		thisfield.value = defaulttext;
	}
}

	Popup = {
 
		init : function () {
			$('a.action_print').bind('click', Popup.printIt);
		},
 
		printIt : function () {
			var win = window.open($(this).attr('href'), 'Image', 'resizable=no,width=700');
			if (win.document) {
				//win.document.writeln('<img src="'+ $(this).attr('href') +'" alt="image" />');
				win.document.close();
				win.focus();
				win.print();
			}
 
			return false;
		}
	}
 
	$(document).ready(function () {
		Popup.init();
	});
 

