');
$("html, body").animate({
scrollTop: $('#image').offset().top
}, 200);
});
$( document ).on( 'click', '#image', function(e) {
$(this).remove();
});
$('.select_url').bind('change', function () {
var url = $(this).val(); // get selected value
if (url) { // require a URL
window.location = url; // redirect
}
return false;
});
$(".search-type a").click(function () {
var search_type = $(this).data('type');
$("#search-selector").val(search_type);
if(!$(this).hasClass("active"))
{
$(".search-type a").removeClass("active");
$(this).addClass("active");
}
});
$('#main-search').submit(function(event) {
var search_type = $("#search-selector").val();
if(search_type == 'videos') {
var search_string = $(".top_query").val();
search_string = search_string.toLowerCase().replace(/[\.\/\: _!]+/g, '_');
window.open('https://wn.com/' + search_string, '_blank');
return false; // do not submit the form
}else{
return true;
}
});
});