if (typeof(jQuery) != "undefined") {
jQuery(document).ready(function($) {
	$.noConflict();
    if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
	// do something to fix menus
	// remove hoverpseudo and replace with click
	// alert("ipad/iphone");
	$("#menu ul li a").bind('touchstart', function(){
        //alert("touch started");
    });
	$("#menu ul li a").bind('touchend', function(){
       // alert("touch ended");
    });
	}
	$("#showall").click(function(){
		 $('#reactiesBox ul').css("height","auto");
		 $('#showall').css("display","none");
		return false; //Prevent the browser jump to the link anchor
	});
	//tabs
	$(".publicaties").hide(); //Hide all content
	$("ul.tabs li:first").addClass("selected").show(); //Activate first tab
	$(".publicaties:first").show(); //Show first tab content
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("selected"); //Remove any "active" class
		$(this).addClass("selected"); //Add "active" class to selected tab
		$(".publicaties").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find href attribute value to identify active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});
	
});
}
if (jQuery("#mygallery")){
		stepcarousel.setup({
			galleryid: 'mygallery', //id of carousel DIV
			beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
			panelclass: 'panel', //class of panel DIVs each holding content
			autostep: {enable:true, moveby:1, pause:3000},
			panelbehavior: {speed:500, wraparound:false, wrapbehavior:'slide', persist:false},
			defaultbuttons: {enable: true, moveby: 1, leftnav: ['/images/prev.png', 7, 132], rightnav: ['/images/next.png', -38, 132]},
			statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
			contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
		});
}

function _comment() {
	var b = jQuery("#ctl00_contentPlaceHolder_CommentText").val().length>0;
	if(!b)
	  jQuery("#ctl00_contentPlaceHolder_CommentWarning").show();
	else
	  doPostBack('ctl00$contentPlaceHolder$Comment','register',null);
}
