// jQuery Placeholder Enhanced by Denis Ciccale (dciccale@gmail.com) || Dual licensed under the MIT and GPL licenses
(function(b){b.fn.placeholderEnhanced=function(){if(!this.length){return}var e="placeholder",d=e in document.createElement("input");if(b.browser.opera&&b.browser.version<"11.50"){d=false}if(!d){b("form").submit(function(){var f=b(this);f.find("input[placeholder], textarea[placeholder]").each(function(){var g=b(this);if(g.attr("value")===g.attr("placeholder")){g.val("")}})})}return this.each(function(){var k=b(this),l=k.attr("placeholder"),m=k.attr("type")==="password";var i=function(){if(k.hasClass(e)){if(!d){k.val("")}k.removeClass(e)}};var f=function(o){if(!k.val()||k.val()===l){if(!d){if(!m){k.addClass(e).val(l)}else{j(g);n(k)}}else{k.addClass(e)}}};var n=function(o){o.css({position:"absolute",left:"-9999em"})};var j=function(o){return o.removeAttr("style")};if(!m||d){k.bind("focus.placeholder",i)}else{var h=(k[0].className)?" "+k[0].className:"";var g=b('<input type="text" class="'+e+h+'" value="'+l+'" tabindex="-1" />');g.bind("focus.placeholder",function(){k.trigger("focus.placeholder")});k.before(g).bind("focus.placeholder",function(){j(k);n(g)})}k.bind("blur.placeholder",f).trigger("blur.placeholder")})};b(function(){b("input[placeholder], textarea[placeholder]").placeholderEnhanced()});var c="placeholder" in document.createElement("input");if(b.browser.opera&&b.browser.version<"11.50"){c=false}if(!c){var a=b.fn.val;b.fn.val=function(d){if(!arguments.length){return b(this).attr("value")===b(this).attr("placeholder")?"":b(this).attr("value")}return a.call(this,d)}}})(jQuery);

$(document).ready(function(){

	$("div.meer").hide();
	$("a.meer").toggle(
		function()
		{
			$("div.meer").slideDown("normal");
			$("a.meer").html("&laquo; minder");
		},
		function()
		{
			$("div.meer").slideUp("fast");
			$("a.meer").html("meer &raquo;");
		}
	);
		
	$(".aanbieding, #foto").hover(
	function()
	{
		$(".tit div", this).show("fast");	
		$(this).css('border-color','#0088B1');
		$('.pic', this).css('border-color','#0088B1');
	},
	function()
	{
		
		$(".tit div", this).hide("fast");	
		$(this).css('border-color','#F6A924');
		$('.pic', this).css('border-color','#F6A924');		
	});
	
	
	
	$(".aanbieding, #foto").click(function()
	{
		document.location.href = $('a',this)[0].href;
		return false;
	});

	$(".rmenu").hover(
	function()
	{
		$(this).addClass('hover');
	},
	function()
	{
		$(this).removeClass('hover');		
	});
	
	$(".rmenu, .duur").click(function()
	{
		document.location.href = $('a',this)[0].href;
		return false;
	});	

	
	$('#kmid img.rnd').wrap('<div class="img"></div>');
	$('.img').append('<div class="tr"></div>');
	$('.img').append('<div class="tl"></div>');
	$('.img').append('<div class="br"></div>');
	$('.img').append('<div class="bl"></div>');	

	$("#kmid a.album").fancybox(
	{
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic',
				'titlePosition' 	: 'over',
				'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
				    return '<span id="fancybox-title-over"><h3>' + (title?title:'') + '&nbsp;</h3>' +  (currentIndex + 1) + '/' + currentArray.length + '</span>';
				}
	});


	$("#prijzen div, #lengtes div").hover(
	function()
	{
		if (this.className.indexOf("vol") == -1)
		{
			$(this).addClass('hover');
		}
	},
	function()
	{
		$(this).removeClass('hover');
	});


	$('.boeknu, #prijzen div').click(function()
	{
		var dat = '';
		if (this.className.indexOf("vol") == -1)
		{
			if (parseInt(this.className) != 0)
			{
				dat = parseInt(this.className);
			}
			$("#kleft").load("/includes/inc_boek.php?id=" + document.body.id.substr(1, document.body.id.length) + "&dat=" + dat + "&init=true");
		}
		return false;
	});
	












});
