////////////////////////////
////////////////////////////
//		ONLOAD
////////////////////////////


$(document).ready(function(){						   
	
	/*
	//THUMBS//
	$('ul.thumb li').hover(function(){
				$(this).find('img').animate({left:'75px'},{queue:false,duration:300});
			}, function(){
				$(this).find('img').animate({left:'0px'},{queue:false,duration:300});
	});
	*/
	//SCROLLPANE TEXT//
	$('#VerticalScrollPane').jScrollPane({showArrows:true, scrollbarWidth: 16, scrollbarMargin: 25});
	$('#VerticalScrollPane_collectie').jScrollPane({showArrows:true, scrollbarWidth: 16, scrollbarMargin: 25});
	$('#VerticalScrollPane_promoties').jScrollPane({showArrows:true, scrollbarWidth: 16, scrollbarMargin: 25});
	$('#VerticalScrollPane_agenda').jScrollPane({showArrows:true, scrollbarWidth: 16, scrollbarMargin: 25});
	$('#VerticalScrollPane_form').jScrollPane({showArrows:true, scrollbarWidth: 16, scrollbarMargin: 25});

	//HORIZONTAL SCROLL - INITIATE//
	var n = $("#pane1 li").length;
	$('#pane1 .blocks1').css("width", n*114+"px");
	
	var n2 = $("#pane2 li").length;
	$('#pane2 .blocks2').css("width", n2*76+"px");
	
	
	var n3 = $("#pane3 li").length;
	$('#pane3 .blocks3').css("width", n3*76+"px");
	
	
	$("#dialog").dialog({
		modal: true,
		draggable: true,
		resizable: false
	});
	
	

	//Tapijten menu overlay
	$(".scroll-interval2").hover(function(){
		$(this).children(".scroll-interval2_overlay").toggle(200);
	});
	$(".scroll-interval3").hover(function(){
		$(this).children(".scroll-interval3_overlay").toggle(200);
	});
	

	//SPECIALE PAGING - andere foto gebruiken//
	var LeftReplacePaging = "<div id='holder_left_btn3' class='holder_left_btn3'></div>";
	var RightReplacePaging = "<div id='holder_right_btn3' class='holder_right_btn3'></div>";
	$("div#PagingReplace .PagingPreviousLink").html(LeftReplacePaging);
	$("div#PagingReplace .PagingNextLink").html(RightReplacePaging);
	
	
	/*
	//aantal karakters van benaming product beperken en "..." achteraan plaatsen (afrekenen winkelwagen klein)//	
	$(".limit1").each(function(el) {				
		var limitVar1 = $(".limit1").text();
		limitVar1 = limitVar1.substring(0,10);
		limitVar1 = limitVar1+"...";
		$('.limit1').html(limitVar1);
	});
	*/
	
	/*
	TopUp.images_path = "Files/Photos/";
	TopUp.players_path = "SiteContent/vancaster/vancaster.be/jquery/Lightbox/players/";
				  
	TopUp.addPresets({
				".Lightbox": {
				group: "links",
				layout: "dashboard",
				effect: "switch",
				modal: 1,
				shaded: 1,
				overlayClose: 1,
				resizable: 0,
				readAltText: 1
				},
	});
*/


});




$(function() {


	
	//REMEMBER MENU//
	$("div#menu ul li a").each(function(el) {
		var th = String($(this).attr("href"));
        var wh = String($(window).attr("location"));
        var tpage = th.substring(th.lastIndexOf("/"));
        if (wh.indexOf(tpage) != -1 ){
            $("#current").attr("id", "");
            $(this).attr("id","current");
            return false;
        }
		
	});
	
	//HORIZONTAL SCROLL - SETUP //
	var originalSizes = new Array();
	
	//$('#pane3').jScrollHorizontalPane3({scrollbarHeight:0, scrollbarMargin:0});
	$('#pane1').jScrollHorizontalPane1({scrollbarHeight:0, scrollbarMargin:0});
	$('#pane2').jScrollHorizontalPane2({scrollbarHeight:0, scrollbarMargin:0});
	$('#pane3').jScrollHorizontalPane3({scrollbarHeight:0, scrollbarMargin:0});
	
	
});

