var myPlayer; var video_code; //init video slider $(document).ready(function(){ if((navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) { $("#wrapper").addClass('idevice'); $("#sitefooter").addClass('idevice'); } video_code = $(".video_wrapper").html(); // save current html5 video embed string for later use. var el_scroller = $("#visual_scroller"); if(el_scroller.length != 0){ el_scroller.easySlider({ auto: false, continuous: false, numeric: true, numItems: 3, marginWidth: 10, marginHeight: 20, controlsBefore: '
' }); } initVideoScroller(); var imagemap = $('#imagemap'); if(imagemap.length != 0) { initImageMapToolTips(); } //initialize colorbox $(".details").colorbox({width:"960", height:"450", iframe:true}); $("#sort").change(function(){ $("#sortfield").val($("#sort").val()); $("#searchform").submit(); }); $("#search").attr("value","Zoeken"); $("#search").focus(function(){ if($("#search").attr("value") == "Zoeken"){ $("#search").attr("value",""); } }); $("#search").focusout(function(){ if($("#search").attr("value") == ""){ $("#search").attr("value","Zoeken"); } }); }); function initVideoScroller(){ $(".vid_button").each(function(){ $(this).click(function(){ var videoUrl = $(this).attr("href"); $(".video_wrapper").html(video_code); $("#embed_video").attr("src",videoUrl); $("#embed_video").attr("autoplay","true"); html5media(); // resets the HTML5 player (or Flowplayer if fallbacked) document.title= "INIT"; return false; }); }); } function initImageMapToolTips(){ $('#scholenzoeker area').each(function() { $(this).qtip( { content: $(this).attr('alt'), // Use the ALT attribute of the area map style: { name: 'blue', classes: 'ui-tooltip-youtube ui-tooltip-shadow', tip: true } }); }); } function setActive(label,checkbox){ if($('input[name=' + checkbox + ']').is(':checked')){ $("#" + label).addClass("search_active"); $("#" + label).removeClass("search_inactive"); }else{ $("#" + label).addClass("search_inactive"); $("#" + label).removeClass("search_active"); } $("#searchform").submit(); } function linkClick(label,checkbox){ if($('input[name=' + checkbox + ']').is(':checked')){ $("#" + label).addClass("search_active"); $("#" + label).removeClass("search_inactive"); }else{ $("#" + checkbox).attr('checked', true); $("#" + label).addClass("search_inactive"); $("#" + label).removeClass("search_active"); } $("#searchform").submit(); }