/* UPDATES FOR 1.8.0.js ie. $('.moreHL').on("click", function(event){ */ $(document).ready(function(){ $("#featured > ul").tabs({fx:{opacity: "toggle", duration:'fast'}}).tabs("rotate", 3300, true); $('#featured').mouseover(function(){ $(this).tabs('rotate', 0, false); }); $('#featured').mouseout(function(){ $(this).tabs({ fx: {opacity: 'toggle', duration:100} }).tabs({event: 'mouseover'}).tabs('rotate', 3300); }); $(".ui-tabs-nav-item div").click(function() { var link = $(this).attr('goto'); window.location.href = link; }); }); /* MASONRY $('.fb_container').masonry({ itemSelector: '.one_third_clear,.one_third_social_empty', columnWidth: 300, gutter: 20, fitWidth: true }); */ var $grid = $('#fb_container').masonry({ itemSelector: '.one_third_clear,.one_third_social_empty', columnWidth: 300, gutter: 20, fitWidth: true }); var $grid = $('#ref_container').masonry({ itemSelector: '.one_third_clear', columnWidth: 300, gutter: 20, fitWidth: true }); $grid.imagesLoaded().progress( function() { $grid.masonry('layout'); $grid.masonry('reloadItems'); }); /* PAGINATION ARTISTS if($('#artist_container').length){ function goToByScroll(id){ $('html,body').animate({scrollTop: $("#"+id).offset().top},'fast'); } $(document).ready(function(){ function loading_show(){ $('#section_loading').html("").fadeIn('fast'); } function loading_hide(){ $('#section_loading').fadeOut('fast'); } function loadData(page){ loading_show(); $.ajax ({ type: "POST", url: "/artists/inc.artists.list.php", data: "page="+page, success: function(msg) { $("#artist_container").ajaxComplete(function(event, request, settings) { loading_hide(); $("#artist_container").html(msg); $(".section_artists, .history").mouseover(function() { $(this).css({ backgroundColor: "#E1E5E2" }, "fast"); }); $(".section_artists").mouseleave(function() { $(this).css({ backgroundColor: "transparent" }, "fast"); }); $(".section_artists").click(function(){ window.location=$(this).find("a").attr("href"); return false; }); }); } }); } loadData(1); // For first time page load default results $('#artist_container .pagination li.active').live('click',function(){ var page = $(this).attr('p'); loadData(page); goToByScroll("section_loading"); }); $('#go_btn').live('click',function(){ var page = parseInt($('.goto').val()); var no_of_pages = parseInt($('.total').attr('a')); if(page != 0 && page <= no_of_pages){ loadData(page); }else{ // alert('Enter a PAGE between 1 and '+no_of_pages); $('.goto').val("").focus(); return false; } }); }); } */ /* PAGINATION MUSIC */ if($('#music_container').length){ function goToByScroll(id){ $('html,body').animate({scrollTop: $("#"+id).offset().top},'fast'); } $(document).ready(function(){ function loading_show(){ $('#section_loading').html("").fadeIn('fast'); } function loading_hide(){ $('#section_loading').fadeOut('fast'); } function loadData(page){ loading_show(); $.ajax ({ type: "POST", url: "/artists/inc.artists.list.php", data: "page="+page, success: function(msg) { $("#artist_container").ajaxComplete(function(event, request, settings) { loading_hide(); $("#music_container").html(msg); $(".section_artists, .history").mouseover(function() { $(this).css({ backgroundColor: "#E1E5E2" }, "fast"); }); $(".section_artists").mouseleave(function() { $(this).css({ backgroundColor: "transparent" }, "fast"); }); $(".section_artists").click(function(){ window.location=$(this).find("a").attr("href"); return false; }); }); } }); } loadData(1); // For first time page load default results $('#music_container .pagination li.active').live('click',function(){ var page = $(this).attr('p'); loadData(page); goToByScroll("section_loading"); }); $('#go_btn').live('click',function(){ var page = parseInt($('.goto').val()); var no_of_pages = parseInt($('.total').attr('a')); if(page != 0 && page <= no_of_pages){ loadData(page); }else{ //alert('Enter a PAGE between 1 and '+no_of_pages); $('.goto').val("").focus(); return false; } }); }); } /* SHOW MORE ON ARTISTS / MEMBERS PAGE */ /*show more videochannel text*/ $('.showInfo, .lessInfo').live('click',function(){ var data = $(this).attr("id"); var video_id = $(this).attr("data"); data = data.split('-'); var div_type = data[0]; var div_id = data[1]; if(div_type == "showmore") { $("#teaservw"+div_id).hide(); $(this).hide(); $("#completevw"+div_id).css("display", "inline-block").show(); $("#showless-"+div_id).show(); } if(div_type == "showless") { $("#completevw"+div_id).hide(); $(this).hide(); $("#teaservw"+div_id).css("display", "inline-block").show(); $("#showmore-"+div_id).show(); $('html, body').animate({ scrollTop: $('.video_frame#'+video_id).offset().top-50 }); } /*END show more videochannel text*/ }); /* show all references on artist page */ $('.moreMusic').click(function(){ $(function() { $("#append_music").load("/artists/inc.artist.references.more.php", function(responseText, statusText, xhr) { if(statusText == "success") /* alert("Successfully loaded the content!"); */ $("#append_music").show(); $(".moreMusic").hide(); // removing old more button if(statusText == "error") alert("An error occurred: " + xhr.status + " - " + xhr.statusText); }); }); }); /* show all releases on artist page */ $('.moreReleases').click(function(){ $(function() { $("#append_releases").load("/artists/inc.artist.releases.more.php", function(responseText, statusText, xhr) { if(statusText == "success") /* alert("Successfully loaded the content!"); */ $(".moreReleases").hide(); // removing old more button $("#append_releases").show(); if(statusText == "error") alert("An error occurred: " + xhr.status + " - " + xhr.statusText); }); }); }); /* show all releases on member page */ $('.moreFavReleases').click(function(){ $(function() { $("#append_favreleases").load("/members/inc.member.releases.more.php", function(responseText, statusText, xhr) { if(statusText == "success") /* alert("Successfully loaded the content!"); */ $(".moreFavReleases").hide(); // removing old more button $("#append_favreleases").show(); if(statusText == "error") alert("An error occurred: " + xhr.status + " - " + xhr.statusText); }); }); }); /* show all releases on artist page */ $('.moreFavs').click(function(){ $(function() { $("#append_favs").load("/artists/inc.artist.favorites.more.php", function(responseText, statusText, xhr) { if(statusText == "success") /* alert("Successfully loaded the content!"); */ $("#append_favs").show(); $(".moreFavs").hide(); // removing old more button if(statusText == "error") alert("An error occurred: " + xhr.status + " - " + xhr.statusText); }); }); }); /* show all related on artist page */ $('.moreRelated').click(function(){ $(function() { $("#append_related").load("/artists/inc.artist.related.more.php", function(responseText, statusText, xhr) { if(statusText == "success") /* alert("Successfully loaded the content!"); */ $("#append_related").show(); $(".moreRelated").hide(); // removing old more button if(statusText == "error") alert("An error occurred: " + xhr.status + " - " + xhr.statusText); }); }); }); /* show all highlights on member page */ $('.moreHL').click(function(){ $(function() { $("#append_hl").load("/members/inc.highlights.more.php", function(responseText, statusText, xhr) { if(statusText == "success") $("#append_hl").show(); $(".moreHL").hide(); if(statusText == "error") alert("An error occurred: " + xhr.status + " - " + xhr.statusText); }); }); }); $(".lessMusic, .lessReleases, .lessFavReleases,, .lessFavs, .lessRelated").live("click", function () { $("#append_releases").hide(); $(".moreReleases").show(); // restore old more button $("#append_favreleases").hide(); $(".moreFavReleases").show(); // restore old more button $("#append_music").hide(); $(".moreMusic").show(); // restore old Music button $("#append_favs").hide(); $(".moreFavs").show(); // restore old favs button $("#append_related").hide(); $(".moreRelated").show(); // restore old related button }); /* SHOW MORE ON MUSIC PAGE */ /* show all references on music page */ $('.moreMusic_music').click(function(){ $(function() { $("#append_music").load("/music/inc.profile.references.more.php", function(responseText, statusText, xhr) { if(statusText == "success") /* alert("Successfully loaded the content!"); */ $("#append_music").show(); $(".moreMusic_music").hide(); // removing old more button if(statusText == "error") alert("An error occurred: " + xhr.status + " - " + xhr.statusText); }); }); }); /* show all releases on music page */ $('.moreReleases_music').click(function(){ $(function() { $("#append_releases").load("/music/inc.profile.releases.more.php", function(responseText, statusText, xhr) { if(statusText == "success") /* alert("Successfully loaded the content!"); */ $(".moreReleases_music").hide(); // removing old more button $("#append_releases").show(); if(statusText == "error") alert("An error occurred: " + xhr.status + " - " + xhr.statusText); }); }); }); /* show all related on music page */ $('.moreRelated_music').click(function(){ $(function() { $("#append_related").load("/music/inc.profile.related.more.php", function(responseText, statusText, xhr) { if(statusText == "success") /* alert("Successfully loaded the content!"); */ $("#append_related").show(); $(".moreRelated_music").hide(); // removing old more button if(statusText == "error") alert("An error occurred: " + xhr.status + " - " + xhr.statusText); }); }); }); $(".lessMusic_music, .lessReleases_music, .lessRelated_music").live("click", function () { $("#append_music").hide(); $(".moreMusic_music").show(); // restore old more button $("#append_releases").hide(); $(".moreReleases_music").show(); // restore old more button $("#append_related").hide(); $(".moreRelated_music").show(); // restore old more button }); /* SHOW/HIDE RELEASES NOTES + COMPANIES + ...*/ $('.info_slider').hide(); $('.flip').click(function() { $('.info_slider').slideToggle('fast', function() { $('.flip span').text().toLowerCase().indexOf('hide full text') != -1 ? $('.flip span').text('show full text') : $('.flip span').text('hide full text'); }); }); $('.fullbio').click(function() { $('.info_slider').slideToggle('fast', function() { $('.fullbio span').text().toLowerCase().indexOf('hide full biography') != -1 ? $('.fullbio span').text('show full biography') : $('.fullbio span').text('hide full biography'); }); }); $('.cshowbrand').click( function() { $('#cbrands' + $(this).attr('id')).toggle(); $(this).text($(this).text() == 'show brands' ? 'hide brands' : 'show brands'); }); /* show companies + brands */ $('.eventName').click( function() { var id = $(this).attr('id'); var type = $('.eventName').attr('data'); if(type == "companies") { var file = '/brands/inc.companies.php'; } if(type == "stores") { var file = '/brands/inc.stores.php'; } $("#cbrandsView").show(); $.ajax({ type: "POST", url: file, data: "country="+ id, success: function(data){ $("#cbrandsView").html(data, {}, function(){ $('.cshowbrand a').text($(this).text() == 'show brands' ? 'hide brands' : 'show brands'); }); }, error : function(data) { } }); }); $('.cshowbrand').live("click", function () { $('#cbrands' + $(this).attr('id')).toggle(); $('.cshowbrand a').text($(this).text() == 'show brands' ? 'hide brands' : 'show brands'); }); /* show dates festivals */ $('.acuritem').click( function() { $('.apastitem' + $(this).attr('id')).toggle(); $(this).text($(this).text() == 'show past events' ? 'hide past events' : 'show past events'); }); $('.acitem').click( function() { $('#aitem' + $(this).attr('id')).toggle(); $(this).text($(this).text() == 'show past events' ? 'hide past events' : 'show past events'); }); /* artists tabs http://jqueryfordesigners.com/jquery-tabs/ */ $(document).ready(function () { $('#tabNavigation').tabify(); }); /*show more artists with brand*/ $(function() { $('.moreBrArt').live("click",function() { var ID = $(this).attr("id"); if(ID) { $("#more"+ID).html(''); $.ajax({ type: "POST", url: "/include/inc.profile.artists.more.php", data: "lastmsg="+ ID, cache: false, success: function(html){ $("#artists").append(html); $("#more"+ID).remove(); // removing old more button } }); } else { $(".morebox").html('
No more artists found
');// no results } return false; }); }); $(function() { $('.moreVid').live("click",function() { var morevideos = $(this).attr("id"); morevideos = morevideos.split('-'); var ID = morevideos[0]; var section = morevideos[1]; if(ID) { if(section == "artists") { var file = '/videos/inc.videos.artists.more.php'; } if(section == "brands") { var file = '/videos/inc.videos.brands.more.php'; } if(section == "members") { var file = '/videos/inc.videos.members.more.php'; } if(section == "music") { var file = '/videos/inc.videos.music.more.php'; } $("#more"+ID).html(''); $.ajax({ type: "POST", url: file, data: "lastmsg="+ ID, cache: false, success: function(html){ $("#appVidz").append(html); $("#more"+ID).remove(); // removing old more button }, error: function(){ $("#appVidz").html('
No more videos found
'); $("#more"+ID).remove(); // removing old more button } }); } else { $(".morebox").html('
No more videos found
');// no results } return false; }); }); /* NAVIGATION HOVER */ $(document).ready(function() { var activeId = $(".active").attr("id").replace("mainnav",""); var activeIdTop = $(".active").attr("id").replace("mainnav",""); $("#navigation-sub" + activeId).show(); $("#navigation-sub-artistlist" + activeId).show(); $("#mainnav" + activeId).css('background-color', '#333333'); /* main #333 on start */ $('a', "#mainnav" + activeId).css({'color': '#FFFFFF', 'margin-top': '0'}); /* link in hover white on start */ $("#mainnav a").hover(function() { $(".navigation-sub").hide(); $(".navigation-sub-artistlist").hide(); $("#mainnav .active").removeClass("active").css({'color': '#333', 'background-color': '#FFF'}); $("#mainnav1 a").css({'color': '#333', 'background-color': '#FFF'}); $(this).addClass("active").css({'color': '#FFFFFF', 'background-color': '#333'}); var id = $(this).closest("li").attr("id").replace("mainnav",""); $("#navigation-sub" + id).show(); if(id != 4) { $(".navigation_sub_visitor").hide(); } if(id != 1) { $(".navigation_sub_home").hide(); } }); $(".navigation-sub, #navwrapper").mouseleave(function() { $(".navigation-sub").hide(); $("#navigation-sub" + activeId).show(); $("#mainnav .active").removeClass("active").css({'color': '#333', 'background-color': '#FFF'}); $("#mainnav"+activeId + " a").css({'color': '#FFF', 'background-color': '#333'}); }); }); /* SUBSECTION NEWS - hovering over news lists $(".section_news, .history").mouseover(function() { $(this).css({ backgroundColor: "#EBEBEB" }, "fast"); }); */ $(".section_news").mouseleave(function() { $(this).css({ backgroundColor: "transparent" }, "fast"); }); $(".section_news, .twotop, .section_news, #viewport li, #artistshome_videolist, .section_artists, #home_members_main, #brandHomeBox, #musmain, #releasesmain, #soloreleasesmain, .vhome_block_right, .vidhome , .viditem, #svc_musmain, .vhome_block, .shome_block, .vhome, .dz_priv .pblock, #function_link").live("click", function(){ window.location=$(this).find("a").attr("href"); return false; }); $('.sharelink').click(function(){ var value = $(this).attr("data"); window.open(value, '_blank'); return false; }); /* HOME NEWS CAROUSEL http://caroufredsel.frebsite.nl/ */ /*if ($('body#home').length){ */ if($('#homecar').length){ $('#homecar').carouFredSel({ prev: '#prev, #prevRight', next: '#next, #nextRight', pagination: "#list_carousel_pager", auto: false }); } if($('#musicvidz').length){ $('#musicvidz').carouFredSel({ prev: '#prev, #prevRight', next: '#next, #nextRight', pagination: "#list_carousel_pager", auto: false }); } if($('#musicnews').length){ $('#musicnews').carouFredSel({ prev: '#prev, #mn_prevRight', next: '#next, #mn_nextRight', pagination: "#list_carousel_pager", auto: false }); } if($('#musicphotos').length){ $('#musicphotos').carouFredSel({ prev: '#prev, #mp_prevRight', next: '#next, #mp_nextRight', pagination: "#list_carousel_pager", auto: false }); } if($('#musreleases').length){ $('#musreleases').carouFredSel({ prev: '#prev, #mr_prevRight', next: '#next, #mr_nextRight', pagination: "#list_carousel_pager", auto: false }); } if($('#soloreleases').length){ $('#soloreleases').carouFredSel({ prev: '#prev, #mrs_prevRight', next: '#next, #mrs_nextRight', pagination: "#list_carousel_pager", auto: false }); } $(document).ready(function() { $("#responsecontainer").load("/scripts/reload_membersh.php"); var refreshId = setInterval(function() { $("#responsecontainer").load('/scripts/reload_membersh.php?randval='+ Math.random()); }, 15000); }); /*}*/ /* DROP DOWN BOX */ /* http://www.jankoatwarpspeed.com/post/2009/07/28/reinventing-drop-down-with-css-jquery.aspx */ if($('#news_sub_search').length){ $(document).ready(function() { $(".dropdown dt a").click(function() { $(".dropdown dd ul").toggle(); }); $(".dropdown dd ul li a").click(function() { var dropItem = getSelectedValue("sample"); var text = $(this).html(); $(".dropdown dt a span").html(text); $(".dropdown dd ul").hide(); $("#result").html("Selected value is: " + getSelectedValue("sample")); if(getSelectedValue("sample") == 3) { $('#search_dates').show(); } if(getSelectedValue("sample") != 3) { $('#search_dates').hide(); } }); function getSelectedValue(id) { return $("#" + id).find("dt a span.value").html(); } $(document).bind('click', function(e) { var $clicked = $(e.target); if (! $clicked.parents().hasClass("dropdown")) $(".dropdown dd ul").hide(); }); $("#flagSwitcher").click(function() { $(".dropdown img.flag").toggleClass("flagvisibility"); }); $(function() { $('#sample').change(function(){ $('.colors').hide(); $('.' + $(this).val()).show(); }); }); }); /* search checkboxes */ if ( $("#nwsmain_level").is ( ":checked" ) ) { $(".search").not(this).attr ( "disabled" , true ); $("#nwsmain_level").attr ( "disabled" , false ); } $(function(){ $("#nwsmain_level").click ( function() { if ( $("#nwsmain_level").is ( ":checked" ) ) { $(".search").not(this).attr ( "disabled" , true ); } if ( !$("#nwsmain_level").is ( ":checked" ) ) { $(".search").not(this).removeAttr ( "disabled"); } }); }); } /* HIGHLIGHTS & COMMENT BOXES */ $(document).ready(function(){ /* 1. HIGHLIGHTS */ if ($('#highlights').length > 0) { /* highlights */ $("textarea#highlight").focus(function() { $("#highlightVals").show(); }); var default_highlight = $("textarea#highlight").val(); var default_date = $("#hl_date").val(); var default_location = $("#hl_location").val(); $("textarea#highlight").blur(function () { if(this.value == '') { this.value = default_highlight; } }); $("#hl_date").blur(function () { if(this.value == '') { this.value = default_date; } }); $("#hl_location").blur(function () { if(this.value == '') { this.value = default_location; } }); $('#hl_date,#hl_location').focus(function() { $(this).val(''); }); $("#hl_ins").click(function() { $(".error").hide(); var hasError = hasError; var hl_highlight = $("#highlight").val(); var hl_location = $("#hl_location").val(); var hl_day = $("#hl_day").val(); var hl_month = $("#hl_month").val(); var hl_year = $("#hl_year").val(); var date = $('#hl_year').val() + '-' + $('#hl_month').val() + '-' + $('#hl_day').val(); if(hl_location == default_location) { hl_location = ''; } var dataString = 'hl_highlight='+ hl_highlight + '&hl_location=' + hl_location + '&hl_date=' + date; if(hl_highlight == default_highlight) { hasError = true; $("#hlerr_hl").after('
Write a highlight
'); } if(hl_year == '') { hasError = true; $("#hlerr_date").after('
Enter at least the year
'); } else { var date = $('#reg_year').val() + '-' + $('#reg_month').val() + '-' + $('#reg_day').val(); $("#err_date").hide();} if (hasError == undefined) { $('#waiting').show(50); $('#dz_commentaar').show(0); $('#message').hide(0); $.ajax({ type: "POST", url: "/include/process/highlights_add.php", data: dataString, success: function(){ $('#shw_comments').load('/include/process/highlights.php'); $('#comment').blur(); $("#commentTips").hide(); $('#waiting').hide(500); $('#message').removeClass().addClass((data.error === true) ? 'error' : 'success') .text(data.msg).show(200); if (data.error === true) $('#dz_commentaar').show(200); $('.hl_succes').fadeIn(200).show(); $('.hlerror').fadeOut(200).hide(); } }); } return false; }); $('.hl_edit').live({ click: function() { $('.hl_box').hide(); var value = $(this).attr ( "id" ); $('#hl_box' + value).show(); return false; } }); $('html').live("click", function(){ $('.hl_box').hide(); }); $('#hl_box').click(function(event) { event.stopPropagation(); }); $('.hl_cancel').click(function(event){ $('#hl_box').toggle(); }); /* delete highlight */ $(".hl_delete").live({ click: function() { var target = $(this).attr("id"); $(this).closest("div:.hl_block").replaceWith(jQuery('#hl_repl')); $('#hl_repl').show(); $.ajax({ type : 'POST', url : '/include/process/highlights_remove.php', dataType : 'json', data: { main_id : target, }, success: function(){ }, error: function(){ //alert('failure'); } }); // end .ajax } // end click function }); /* show all highlights on member page */ $('.moreHL').live("click", function(){ $("#append_hl").load("/members/inc.highlights.more.php", function(responseText, statusText, xhr) { if(statusText == "success") $("#append_hl").show(); $(".moreHL").hide(); if(statusText == "error") alert("An error occurred: " + xhr.status + " - " + xhr.statusText); }); }); $(".lessHL").live("click", function () { $("#append_hl").hide(); $(".moreHL").show(); }); } /* 2. COMMENTS */ $('textarea#comment, textarea#highlight').autoResize({ animateDuration : 300, extraSpace : 10, }); $('textarea.video-description').live('focus blur', function() { $(this).autoResize({ animateDuration : 300, extraSpace : 10, }); }); $(document).click(function() { $("#commentTips").hide("fast"); }); $("textarea#comment").click(function(e) { e.stopPropagation(); $("#commentTips").show("fast"); return false; }); $("#dialog").dialog({ autoOpen: false, modal: true }); }); $('#comment').keypress(function (e){ if (e.keyCode == 13 && !e.shiftKey) { e.preventDefault(); if (e.keyCode == 13) { $('#dz_comment').trigger('submit'); $('#waiting').show(50); $('#dz_commentaar').show(0); $('#message').hide(0); $.ajax({ type : 'POST', url : '/include/process/comment_add.php', dataType : 'json', data: { comment: $('#comment').val(), main_url: $('#main_url').val(), main_section: $('#main_section').val(), main_subnavID: $('#main_subnavID').val(), main_id: $('#main_id').val(), main_memberID: $('#main_memberID').val(), }, success : function(data) { $('#shw_comments').load('/include/process/comments.php?url_id='); $('#comment').blur(); $("#commentTips").hide(); $('#waiting').hide(500); $('#message').removeClass().addClass((data.error === true) ? 'error' : 'success') .text(data.msg).show(200); if (data.error === true) $('#dz_commentaar').show(200); }, error : function(XMLHttpRequest, textStatus, errorThrown) { $('#waiting').hide(500); $('#message').removeClass().addClass('error') .text('We\'re sorry, somehow something went wrong with your request. Please try again or contact us.').show(500); $('#dz_commentaar').show(200); }, }); } } }); $('.show_comment_box').live('click',function() { var boxID = $(this).attr("id"); $('#c-'+boxID).show(50); $('#c-close').live('click',function() { $('#c-'+boxID).hide(); }); }); $(".jq_delete_comment").live({ click: function() { $(this).closest("div:.comments").remove(); var target = $(this).attr("id"); $('#waiting2').show(50); $('#dz_commentaar').show(0); $('#message2').hide(0); $.ajax({ type : 'POST', url : '/include/process/comment_remove.php', dataType : 'json', data: { main_id : target, }, success: function(){ $('#message').removeClass().addClass('error') .text('Your comment was removed.').show(500); }, error: function(){ //alert('failure'); } }); // end .ajax } // end click function }); /* OPEN VIDEO PLAYER ARTICLE $('div.videopanel').hide(); $('div.imagestill').click(function() { $('div.videopanel').show('400'); return false; }); $('#stopplayback').click(function() { $('div.videopanel').hide('400'); return false; }); */ $('div.videopanel').hide(); $('.imagestill').click(function(){ $('div.videopanel').show('400'); var vidItem = $(this).attr('data'); var dataString = 'ref='+ vidItem; $.ajax({ type: "POST", url: "/news/inc.article.video.play.php", data: dataString, success: function(data){ $("#vidscr").html(data); }, error : function(data) { } }); }); /* THUMBS POP ON MOUSEOVER * -->http://www.malsup.com/jquery/hoverpulse/ */ //$('.clrelimg img').hoverpulse({ size: 150, speed: 100, }); $("iframe").each(function(){ var ifr_source = $(this).attr('src'); var wmode = "?wmode=transparent"; $(this).attr('src',ifr_source+wmode); }); /* FUNCTION TO VERTICAL-ALIGN TEXT BLOCKS */ $(document).ready(function(){ jQuery.fn.center = function () { this.css("top",$(window).height()/2-this.height()/2 + "px"); this.css("left",$(window).width()/2-this.width()/2 + "px"); return this; } $(".home_mus_overlay").center(); }); /* TRACK LINKS TO EXTERNAL SITES */ $(".artistLinks, .companyL, .vp_descr a").click(function () { var self = this; var info = $(this).attr('id'); var infoArr = info.split('-'); var mainID = infoArr[0]; var section = infoArr[1]; var gozone = infoArr[2]; var gourlID = infoArr[3]; var gourl = infoArr[4]; /* alert("--> 1 " + mainID + ' 2 ' + section + ' 3 ' + gourlID + ' 4 ' + gourl + ' url: ' + self); */ $.ajax({ type : 'POST', url : '/include/process/tracker.ext.link.php', dataType : 'json', data: { mainurlNR: mainID, mainsection: section, maingourlNR: gourlID, maingourl: gourl, mainzone: gozone }, success: function(){ /* alert("Can do it..." + section); */ }, error: function(){ /* alert('failure'); */ } }); // end .ajax }); /* * * HANDLE SITEWIDE LIKES * --> TOOLTIPS: http://flowplayer.org/tools/demos/tooltip/index.html * http://jquerytools.org/demos/ * q: http://stackoverflow.com/questions/7182392/change-image-on-id-after-succes */ /* TOOLTIP FOR WATCHING ARTIST VIDEOS */ $("div#artistshome_videolist[title]").tooltip({ position: 'fixed', offset: [10, -490], delay: 0 }); $("span.info[title]").tooltip({ position: 'fixed', offset: [15, 5], delay: 0 }); $(".mtr_right img[title], .mtr_right div[title]").tooltip({ position: 'top center', offset: [-2, 0], delay: 0 } ); //general DZ like img $(".dz_like img[title], span.lt_unlike[title], span.s_opt_l[title]").live('hover', function() { $('.dz_like img[title], span.lt_unlike[title], span.s_opt_l[title]').tooltip({ position: 'center left', offset: [0, -2], delay: 0 }) }); $(".dz_like_track img[title],.s_opt_panel span.info[title],.srl_r img[title]").live('hover', function() { $('.dz_like_track img[title],.s_opt_panel span.info[title],.srl_r img[title]').tooltip({ position: 'center right', offset: [0, 2], delay: 0 }) }); $(".dz_like_a_page img[title]").tooltip({ position: 'center left', offset: [0, -2], delay: 0 }); /* ARTISTS */ $('.like_artist').live("click", function (event) { var value = $(this).attr ( "id" ); //$(this).attr("src", "/img/icons/checked.gif"); $(this).attr({ src: '/img/icons/checked.gif', }); //CHANGE CLASS ON CLICK //$(this).removeClass("like_artist").addClass("liked_artist"); $(".tooltip").html('you like ' + this.name); //alert ( value ); //if (confirm(this.title + ' in dialog zetten & adden in dBase als favorite met nr ' + this.id)) { //add like to dBase here *** WORKING *** $.ajax({ type : 'POST', url : '/include/process/like_artist.php', dataType : 'json', data: { main_memberID: $('#main_memberID').val(), like_section: $('#like_section').val(), like_id: this.id, }, success: function(){ //alert( 'You have just clicked '+event.target.id+' image'); }, error: function(){ } }); // end .ajax //} // end confirm check }); // end like_artist /* *** 20150909: WHEN AT END OF PAGE *** NOT WORKING MOBILE *** $(window).scroll(function() { if($(window).scrollTop() == $(document).height() - $(window).height()) { var lastFound = $('.related_200:last').attr('id'); //alert('more please...' + ' ' + lastFound); if(lastFound) { $("#more"+ID).html(''); $.ajax({ type: "POST", url: "/include/inc.profile.artists.more2.php", data: "lastmsg="+ ID, cache: false, success: function(html){ $("#append_related").append(html); $("#more"+ID).remove(); }, error: function(){ //alert('failure'); } }); } } }); */ /* NEW 2017 ARTIST NAV */ $(document).ready(function() { if(window.location.hash == "news") { var hash = window.location.hash.substring(1); var curr_url = $(".hashurl").attr('href'); //alert (hash); $(".hashurl").href = curr_url + '#' + hash; } $(document).on('click touchstart','#artistnav .anavigation-items a',function(e){ $(this).data('clicked',true); var currentAttrValue = $(this).attr('href'); window.location.hash = $(this).attr('href'); $('.tab' + currentAttrValue).show().siblings().hide(); $(this).parent('li').addClass('active').siblings().removeClass('active'); setTimeout( function() { $('#fb_container').masonry({ itemSelector: '.one_third_clear,.one_third_social_empty', columnWidth: 300, gutter: 20, fitWidth: true }, 500); $('#ref_container').masonry({ itemSelector: '.one_third_clear', columnWidth: 300, gutter: 20, fitWidth: true }, 500); }); e.preventDefault(); }); }); if (!$(this).data('clicked')) { var hash = $.trim( window.location.hash ); if (!hash) { setTimeout(function() { $('#artistnav li.active a').trigger('click'); },10); $('html, body').animate({ scrollTop: 0 }, 20); } } else {} if($("#artistnav").length != 0) { $("document").ready(function() { $(function () { var hash = $.trim( window.location.hash ); if (hash) $('#artistnav .anavigation-items a[href$="'+hash+'"]').trigger('click'); }); }); if (hash === "#news") { $('html, body').animate({ scrollTop: $("#artistnav").offset().top }, 20); } } /* if($("#artistnav").length != 0) { $("document").ready(function() { $(function () { var hash = $.trim( window.location.hash ); if (hash) { $(function (e) { $('#artistnav .anavigation-items a[href$="'+hash+'"]').trigger('click'); e.preventDefault(); }); } if (!hash) { $(function (e) { $('#artistnav li.active a').trigger('click'); e.preventDefault(); }); } }); }); if (hash === "#news") { $('html, body').animate({ scrollTop: $("#artistnav").offset().top }, 20); } } */ /* END NEW 2015 ARTIST NAV */ /* BRANDS */ $('.like_brand').live("click", function (event) { /* $('.like_brand').click(function (event) { */ var value = $(this).attr ( "id" ); //$(this).attr("src", "/img/icons/checked.gif"); $(this).attr({ src: '/img/icons/checked.gif' }); $(".tooltip").html('you like ' + this.name); //alert ( value ); //if (confirm(this.title + ' in dialog zetten & adden in dBase als favorite met nr ' + this.id)) { //add like to dBase here *** WORKING *** $.ajax({ type : 'POST', url : '/include/process/like_brands.php', dataType : 'json', data: { main_memberID: $('#main_memberID').val(), like_section: $('#like_section').val(), like_id: this.id, }, success: function(){ //alert( 'You have just clicked '+event.target.id+' image'); }, error: function(){ //alert('failure'); } }); // end .ajax //} // end confirm check }); /* MUSIC $('.like_music').live("hover", function (event) { $(".tooltip").html('like ' + this.name); }); */ $('.like_music').live("click", function (event) { var value = $(this).attr ( "id" ); //$(this).attr("src", "/img/icons/checked.gif"); $(this).attr({ src: '/img/icons/checked.gif' }); /*----------------------- OMBOUWEN NAAR TITLE CHANGE ie: $('.liked_music' + id).attr('title', 'you like ' + this.name); */ $(".tooltip").html('you like ' + this.name); //alert ( value ); //if (confirm(this.title + ' in dialog zetten & adden in dBase als favorite met nr ' + this.id)) { //add like to dBase here *** WORKING *** $.ajax({ type : 'POST', url : '/include/process/like_music.php', dataType : 'json', data: { main_memberID: $('#main_memberID').val(), like_section: $('#like_section').val(), like_id: this.id, }, success: function(){ //alert( 'You have just clicked '+event.target.id+' image'); }, error: function(){ //alert('failure'); } }); // end .ajax //} // end confirm check }); /* RELEASES */ $('.like_releases').live("click", function (event) { /*$('.like_releases').click(function (event) { */ var value = $(this).attr ( "id" ); //$(this).attr("src", "/img/icons/checked.gif"); $(this).attr({ src: '/img/icons/checked.gif' }); $(".tooltip").html('you like ' + this.name); //alert ( value ); //if (confirm(this.title + ' in dialog zetten & adden in dBase als favorite met nr ' + this.id)) { //add like to dBase here *** WORKING *** $.ajax({ type : 'POST', url : '/include/process/like_releases.php', dataType : 'json', data: { main_memberID: $('#main_memberID').val(), like_section: $('#like_section').val(), like_id: this.id, }, success: function(){ //alert( 'You have just clicked '+event.target.id+' image'); }, error: function(){ //alert('failure'); } }); // end .ajax //} // end confirm check }); /* RELEASES */ $('.like_tracks').live("click", function (event) { /*$('.like_tracks').click(function (event) { */ var value = $(this).attr ( "id" ); //$(this).attr("src", "/img/icons/checked.gif"); $(this).attr({ src: '/img/icons/checked.gif' }); $(".tooltip").html('you like ' + this.name); //alert ( value ); //if (confirm(this.title + ' in dialog zetten & adden in dBase als favorite met nr ' + this.id)) { //add like to dBase here *** WORKING *** $.ajax({ type : 'POST', url : '/include/process/like_releases_tracks.php', dataType : 'json', data: { main_memberID: $('#main_memberID').val(), like_section: $('#like_section').val(), like_id: this.id, }, success: function(){ //alert( 'You have just clicked '+event.target.id+' image'); }, error: function(){ //alert('failure'); } }); // end .ajax //} // end confirm check }); $('.rel_vid_still').click(function(){ var vidItems = $(this).attr('data'); vidItems = vidItems.split('^'); var addr = vidItems[0]; var type = vidItems[1]; var dataString = 'ref='+ addr + '&type=' + type; $.ajax({ type: "POST", url: "/include/process/release.video.play.php", data: dataString, success: function(data){ $("#vidscr").html(data); }, error : function(data) { } }); }); /* more methods */ $(function() { $('.addMethods').live("click",function() { var ID = $(this).attr("id"); if(ID) { $("#moreMethods"+ID).html(''); $.ajax({ type: "POST", url: "/education/inc_methods_more.php", data: "lastmsg="+ ID, cache: false, success: function(html){ $("#append_methods"+ID).append(html); $("#moreMethods"+ID).remove(); // removing old more button } }); } else { $(".morebox").html('
No more artists found
');// no results } return false; }); }); /* MEMBERS ==========*/ /* TOPBAR MESSAGE CENTER ========================*/ $('#ud_mss').live("click", function (event) { $('#top_mss').toggle(); }); $(document).on( "click", "#mss_nxt", function() { var mss = $(this).attr ("data-name"); mss = mss.split('-'); var mssID = mss[0]; var currKey = mss[1]; var dataString = 'mssID='+ mssID + '&currKey=' + currKey; //alert(dataString); $.ajax({ type: "POST", url: "/include/inc.userdata_profile.php", data: dataString, success: function(data){ //alert(data); $(".mpopup-main").html(data); if(data == 1) { $(".like_member").attr({ src: '/img/icons/checked.gif' }); $(".tooltip").html('you like ' + mName); } if(data == 2) { //alert('errrrrrrrrrror'); } }, error : function(data) {} }) }); /* *** ON TOPBAR ACTIONS */ $(document).on( "click", "#mss_go", function() { var hasError = hasError; var mss = $(this).attr ("data-name"); mss = mss.split('-'); var mss_id = mss[0]; var mss_cat = mss[1]; var mss_val = mss[2]; if(mss_id == "1") {alert('1');} /* set acc type */ if(mss_id == "2") {alert('2'); /* set school name*/ if(mss_val == "2") { hasError = true; } /* set PERSONAL school name*/ if(mss_cat == "udc_m_comp_name" && mss_val == "1") { var mss_cat_val = "-"; } /* set OFFICIAL school name*/ if(mss_cat == "udc_m_comp_name" && mss_val == "2") { $('#udc_m_comp_name-entry').show(); } if(mss_cat == "udc_m_comp_name_entry" && mss_val == "3") { var mss_cat_val = $('#udc_m_comp_name_submit').val(); //alert('catclick' + ' :' + mss_cat_val); if(mss_cat_val == '') { hasError = true; $('#udc_m_comp_name_submit').val('').css({'background':'yellow'}); } } } if(mss_id == "3") {//alert('3'); } /* set LOCATION */ if(mss_cat == "udc_address" && mss_val == "1") { var valid = valid; $('.validatefield').each(function() { if ($(this).val() == '') { $(this).css({'background':'yellow'}); valid = true; hasError = true; } }); if(valid == undefined) { var ud_street = $('#ud_street').val(); var ud_postal = $('#ud_postal').val(); var ud_city = $('#ud_city').val(); var ud_country = $('#ud_country').val(); var mss_cat_val = ud_street+'^'+ud_postal+'^'+ud_city+'^'+ud_country; } //alert(mss_cat_val); } if(mss_id == "4") { var mss_cat_val = $('#udc_link').val(); if(mss_cat_val == '') { hasError = true; $('#udc_link').val('').css({'background':'yellow'}); } else { //alert(mss_cat_val); /** TO DO **/ } } var dataString = 'mss_id='+ mss_id + '&mss_cat='+ mss_cat + '&mss_val=' + mss_val + '&mss_cat_val=' + mss_cat_val; //alert(dataString); if(hasError == undefined) { $.ajax({ type: "POST", url: "/include/inc.userdata_profile.php", data: dataString, success: function(data){ //alert(data); $("#top_mss").html(data); if(data == 1) { $(".like_member").attr({ src: '/img/icons/checked.gif' }); $(".tooltip").html('you like ' + mName); } if(data == 2) { //alert('errrrrrrrrrror'); } }, error : function(data) { //alert('errrrrrrrrrror'); } }) } }); /* ========================= END TOPBAR MESSAGE CENTER */ $('.like_member').live("click", function (event) { var value = $(this).attr ( "id" ); var mName = $(this).attr ( "name" ); var dataString = 'like_id='+ value; $.ajax({ type: "POST", url: "/include/process/like_member.php", data: dataString, success: function(data){ if(data == 1) { $(".like_member").attr({ src: '/img/icons/checked.gif' }); $(".tooltip").html('you like ' + mName); } if(data == 2) { //alert('errrrrrrrrrror'); } }, error : function(data) { } }); }); /* LOGIN / REGISTER */ /* login */ $("#log_username").blur(function() { hasError = true; var username_length; username_length = $("#log_username").val().length; $("#err_username").empty(); if (username_length < 4) $("#err_username").append("Your username is not save because it is too short."); $('#login').attr('disabled', 'disabled'); if (username_length > 3) $('#login').removeAttr('disabled'); }); $("#log_pwd").blur(function() { hasError = true; var username_length; username_length = $("#log_pwd").val().length; $("#err_pwd").empty(); if (username_length < 6) $("#err_pwd").append("Password is too short"); $('#login').attr('disabled', 'disabled'); if (username_length > 5) { $('#login').removeAttr('disabled').focus(); } }); $(document).keyup(function(event) { if (event.keyCode == 13) { $("#form_login").submit(); } }); /* in page*/ $('#login_page').click(function(e) { e.preventDefault(); $(".regerror").hide(); var hasError = hasError; var userVal = $("#log_username_p").val(); var passVal = $("#log_pwd_p").val(); if(userVal == '') { hasError = true; $("#log_username_p").after('
Enter your username
'); $("#log_username_p").css({'background':'yellow', color : '#333'}); } if($("#log_username_p").val() != "") { var username_length; username_length = $("#log_username_p").val().length; if (username_length < 4) hasError = true; } if(passVal == '') { hasError = true; $("#log_pwd_p").after('
Enter your password
'); $("#log_pwd_p").css({'background':'yellow', color : '#333'}); } if($("#log_pwd_p").val() != "") { var username_length; pwd_length = $("#log_pwd_p").val().length; if (pwd_length < 6) hasError = true; } if (hasError == undefined) { $(this).closest('form').trigger('submit'); } else { //alert('i cant go in!'); } }); /* recover */ if ($('body#recover').length){ var resUsernameVal = $("#reset_username").val(); var resNameVal = $("#reset_name").val(); $('.login').each(function() { $(this).css("color","#CCC"); var default_value = this.value; $(this).focus(function() { $(this).css("color","black"); if(this.value == default_value) { this.value = ''; } }); $(this).blur(function() { $(this).css("color","#CCC"); $("#reset_search").not('click').click(function(e) { if(this.value == '') { this.value = default_value; } }); }); }); $("#reset_username").blur(function() { hasError = true; var username_length; username_length = $("#reset_username").val().length; if (username_length < 4) $("#err_username").append("Give a proper email or name"); $('#reset_name').attr('disabled', 'disabled'); $(this).blur(function() { $('#login').removeAttr('disabled'); }); }); $("#reset_username").click(function() { $("#reset_username").val(''); $('#reset_username').focus(); $("#reset_name").val(''); $('#reset_name').attr('disabled', 'disabled'); $("#reset_username").blur(function() { $('#reset_username').removeAttr('disabled'); $('#reset_name').removeAttr('disabled'); }); }); $("#reset_name").click(function() { $("#reset_name").val(''); $('#reset_name').focus(); $("#reset_username").val(''); $('#reset_username').attr('disabled', 'disabled'); $("#reset_name").blur(function() { $('#reset_username').removeAttr('disabled'); $('#reset_name').removeAttr('disabled'); }); }); $("#reset_search").click(function(e) { var newUsernameVal = $("#reset_username").val(); var newNameVal = $("#reset_name").val(); if(resUsernameVal === newUsernameVal || resNameVal === newNameVal) { $("#err_reset").show(); e.preventDefault(); } if(resUsernameVal != newUsernameVal || resNameVal != newNameVal) { $("#err_reset").hide(); e.preventDefault(); var dataString = 'newUsernameVal='+ newUsernameVal + '&newNameVal=' + newNameVal; if(newUsernameVal == '' && newNameVal == '') { $("#err_reset").show(); } else { $.ajax({ type: "POST", url: "/include/process/recover.inc.php", data: dataString, dataType:'json', success: function(data) { $('#err_recover').fadeIn(200).show(); if(data.active == "N") { var error_active = '1'; var suck = '--Not active'; } if(data.active == "J") { var error_active = '0'; var suck = ''; } if(data.email != undefined && data.active == "J") { $('.log_error').hide(); $("#err_recover").html( 'We found an account that matches your search on this email: ' + data.email + '' + '

Is this your current email address?' + '


Yes, this is me!

You have to confirm this is you. You will then receive an email with a link to reset your password.' + '
' + '


No, I don\'t use this email address anymore.

' + '
Sorry, but we cannot reset your account when you don\'t have acces to an out-of-use mail account.' + '

The good news is that you can re-register here with your current email or through Facebook. You can then add other email addresses as well, so you will never lose access again.' + '

' ); } if(data.email != undefined && data.active == "N") { $('.log_error').hide(); $("#err_recover").html( 'We found an account but it is not activated yet: ' + data.email + '' + '

Is this your current email address?' + '


username
password Yes, this is me!

You have to confirm this is you. You will then receive an email with a link to reset your password.' + '
' + '


No, this is not my current email address.

' + '
Sorry, but we cannot reset your account when you don\'t have acces to an out-of-use mail account.' + '

The good news is that you can re-register here with your current email. You can then add other email addresses as well, so you will never lose access again.' ); } if(data.email == undefined) { $("#err_recover").html('

There is no account matching your search.

Please use your email, full name or screen name.
'); } } }); } } }); $('#reset_pass').live('click',function(){ var mail = $(this).attr('data'); if(!$('#confirm_acc').is(':checked')) { $(".regerror").hide(); $("#reset_pass").after('
Check the radio button to confirm this is you.
'); } if($('#confirm_acc').is(':checked')) { var resetGo = "1"; var dataString = 'mail='+ mail; $.ajax({ type: "POST", url: "/include/process/recover.send.inc.php", data: dataString, success: function(){ $("#err_recover").html( '

Alright! An email has been sent to your email address.

' + '

ps. Your username is in the email as well. You\'re almost ready to connect to drummerszone again.

' ); } }); } }); $('#reset_pass_val').live('click',function(){ $(".regerror").hide(); var ccode = $("#ccode").val(); var caddr = $("#caddr").val(); var code = $("#code").val(); var addr = $("#addr").val(); var reg_p1_new = $("#reg_p1_new").val(); var reg_p2_new = $("#reg_p2_new").val(); var hasError = hasError; var passwordsVal = $("#reg_p1_new, #reg_p2_new").val(); if(passwordsVal == '') { hasError = true; $("#reg_p1_new, #reg_p2_new").after('

Enter your password.

'); } else if ($("#reg_p1_new").val() != $("#reg_p2_new").val()) { hasError = true; $("#reg_p1_new, #reg_p2_new").after('

Your passwords do not match.

'); } password1_length = reg_p1_new.length; if(reg_p1_new != '' && password1_length < 6) { hasError = true; $("#reg_p1_new").after('
A password has a minimum of 6 characters.
'); } if (hasError == undefined) { var dataString = 'ccode='+ ccode + '&caddr=' + caddr + '&code=' + code + '&addr=' + addr + '®_p1_new=' + reg_p1_new + '®_p2_new=' + reg_p2_new; $.ajax({ type: "POST", url: "/include/process/recover.set_pass.inc.php", data: dataString, success: function(data){ if(data == 1) { $(".log_error").html( 'You have succesfully reset your password. You can now log in to Drummerszone.com.' + '

ps. Your username is in the email we sent you.

' ); } } }); } }); } /* register forms + EXTERNAL LOGIN ===========*/ $('#fb_login_img').click(function() { $(".fb_login_upd").show(); }); $('input').focus(function() { if ($(this).val() != "" && $(this).val() == $(this).data("DefaultText")) $(this).val(""); }).blur(function(){ if ($(this).val() == "") $(this).val($(this).data("DefaultText")); }); $('input[type=radio][name=reg_type]').change(function() { if (this.value == '1') { $('#regfieldComp').hide(); $('#regfieldTeacher').show(); } if (this.value == '2') { $('#regfieldComp').show(); $('#regfieldTeacher').hide(); } }); $('input:text, input:password').focus( function(){ $(this).css({'background':'white', color : '#333'}); $('.regerror').hide(); }); $('#reg_submit').click(function(){ $("input[type='text']").css({'background':'white', color : '#333'}); $(".regerror").remove(); $("#msgbox").hide(); $(".dateerror").remove(); var hasError = hasError; var reg_type = $('#acc_type :radio:checked').val(); var reg_comp = $("#reg_comp").val(); var reg_fn = $("#reg_fn").val(); var reg_ln = $("#reg_ln").val(); var reg_sex = $('#acc_sex :radio:checked').val(); var reg_day = $("#reg_day").val(); var reg_month = $("#reg_month").val(); var reg_year = $("#reg_year").val(); var date = $('#reg_year').val() + '-' + $('#reg_month').val() + '-' + $('#reg_day').val(); var reg_email1 = $("#reg_email1").val(); var reg_email2 = $("#reg_email2").val(); var reg_password1 = $("#reg_password1").val(); var reg_password2 = $("#reg_password2").val(); var dataString = 'reg_type='+ reg_type + '®_comp=' + reg_comp + '®_fn=' + reg_fn + '®_ln=' + reg_ln + '®_email1=' + reg_email1 + '®_email2=' + reg_email2 + '®_password1=' + reg_password1 + '®_password2=' + reg_password2 + '®_sex=' + reg_sex + '®_month=' + reg_month + '®_day=' + reg_day + '®_year=' + reg_year + '&date=' + date; if (!$("input[type=radio][name='reg_sex']:checked").val()) { hasError = true; $(".formE#sexe").html('
Please select male or female
'); } var selected = $("input[type='radio'][name='reg_type']:checked"); if (selected.length == 0) { selectedVal = selected.val(); $(".formE#reg_type").html('
Select a page
'); $(".reg_type").css({'background':'yellow', color : '#333'}); } if ($("#reg_type2:checked").val()) { if(reg_comp == '') { hasError = true; $(".formE#reg_compE").html('
Give your school / institute name
'); $("#reg_comp").css({'background':'yellow', color : '#333'}); } } if(reg_fn == '') { hasError = true; $(".formE#reg_fn").html('
Give your first name
'); $("#reg_fn").css({'background':'yellow', color : '#333'}); } if(reg_ln == '') { hasError = true; $(".formE#reg_ln").html('
Give your last name
'); $("#reg_ln").css({'background':'yellow', color : '#333'}); } var specialChars = "<>@!#$%^&*()_+[]{}?:;|\"\\,./~=" var check = function(string){ for(i = 0; i < specialChars.length;i++) { if(string.indexOf(specialChars[i]) > -1) { return true } } return false; } if(check(reg_fn) == false) { } else { hasError = true; $(".formE#reg_fn").html('
Please refrain from special characters in your name
'); $("#reg_fn").css({'background':'yellow', color : '#333'}); } if(check(reg_ln) == false) { } else { hasError = true; $(".formE#reg_ln").html('
Please refrain from special characters in your name
'); $("#reg_ln").css({'background':'yellow', color : '#333'}); } if(reg_month == '' || reg_day == '' || reg_year == '') { hasError = true; $("#err_date").html('
Enter your birthday
'); } else { var date = $('#reg_year').val() + '-' + $('#reg_month').val() + '-' + $('#reg_day').val(); $("#err_date").hide();} var age = 13; var mydate = new Date(); mydate.setFullYear(reg_year, reg_month-1, reg_day); var currdate = new Date(); currdate.setFullYear(currdate.getFullYear() - age); if ((currdate - mydate) < 0) { $("#err_date").fadeTo(50,0.1,function() { $(this).html('Childeren under 13 must have parental approval to sign up.').addClass('messageboxerror').fadeTo(200,1); }); } else { } var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var emailaddressVal = $("#reg_email1, #reg_email2").val(); if(emailaddressVal == '') { hasError = true; $(".formE#reg_email1E, .formE#reg_email2E").html('
Invalid email. This is also your username on Drummerszone.
'); $("#reg_email1, #reg_email2").css({'background':'yellow', color : '#333'}); } else if(!emailReg.test(emailaddressVal)) { hasError = true; $(".formE#reg_email1E, .formE#reg_email2E").html('
Invalid email
'); $("#reg_email1, #reg_email2").css({'background':'yellow', color : '#333'}); } else if ($("#reg_email1").val() != $("#reg_email2").val()) { hasError = true; $(".formE#reg_email1E, .formE#reg_email2E").html('
The emails don\'t match.
'); $("#reg_email1, #reg_email2").css({'background':'yellow', color : '#333'}); } var passwordsVal = $("#reg_password1").val(); if(passwordsVal == '') { hasError = true; $(".formE#reg_password1").html('
Enter your password
'); $("#reg_password1").css({'background':'yellow', color : '#333'}); } password1_length = reg_password1.length; if(reg_password1 != '' && password1_length < 6) { hasError = true; $(".formE#reg_password1").html('
A password has a minimum of 6 characters
'); $("#reg_password1").css({'background':'yellow', color : '#333'}); } if(passwordsVal == emailaddressVal) { hasError = true; $(".formE#reg_password1").html('
Give a unique password
'); $("#reg_password1").css({'background':'yellow', color : '#333'}); } /* var passwordsVal = $("#reg_password1, #reg_password2").val(); if(passwordsVal == '') { hasError = true; $("#reg_password1, #reg_password2").after('
Enter your password
').css({'background':'yellow', color : '#333'}); } else if ($("#reg_password1").val() != $("#reg_password2").val()) { hasError = true; $("#reg_password1, #reg_password2").after('
Your passwords do not match
').css({'background':'yellow', color : '#333'}); } password1_length = reg_password1.length; if(reg_password1 != '' && password1_length < 6) { hasError = true; $("#reg_password1").after('

A password has a minimum of 6 characters
').css({'background':'yellow', color : '#333'}); } */ if (hasError == undefined) { //alert(dataString + ' ' + hasError); if (emailaddressVal != '' && ($("#reg_email1").val() == $("#reg_email2").val())) { $("#msgbox").removeClass().addClass('messagebox').text('Checking email...').fadeIn("slow"); $.post("/include/process/reg.checkusername.inc.php",{ reg_email1:reg_email1 } ,function(data) { if(data=='used') { hasError = true; $("#msgbox").fadeTo(200,0.1,function() { $(this).html('Username/email "' + reg_email1 + '" is already in use.').addClass('messageboxerror').fadeTo(900,1); $("#reg_email1, #reg_email2").val(""); }); } if(data=='no') { hasError = true; $("#msgbox").fadeTo(200,0.1,function() { $(this).html('Username/email "' + reg_email1 + '" is not possible.').addClass('messageboxerror').fadeTo(900,1); $("#reg_email1, #reg_email2").val(""); }); } else if(data=='yes') { $("#msgbox").fadeTo(200,0.1,function() { $(this).html('Email/username approved.').addClass('messageboxok').fadeTo(900,1); }); /* INSERT NEW MEMBER */ $.ajax({ type: "POST", url: "/include/process/reg.newmember.inc.php", data: dataString, success: function(data){ /*alert('yay!' + ' ' + data);*/ $('.reg_succes').fadeIn(200).show(); $('.regerror').fadeOut(200).hide(); $('#regform').fadeOut(200).hide('slow'); } }); } }); } } else { /*alert('hasallError');*/ } return false; if(hasError ===false) { /*alert('hasallError');*/ } }); if ($('body#signup').length){ if ($('#reg_xval,#reg_cval').length){ var reg_xcode = $("#reg_xval").val(); var reg_ccode = $("#reg_cval").val(); var dataString = 'val_ccode='+ reg_ccode + '&val_xcode=' + reg_xcode; $.ajax({ type: "POST", url: "/include/process/reg.newmember_val.inc.php", data: dataString, success: function(data){ /*alert('all data: ' + dataString);*/ if (data == ''){ $('.showValid').show(); } if (data != ''){ $('.showError').show(); } }, error: function(data){ $('.showError').show(); } }); } } if ($('body#fblogin').length){ $('#extsubmit').live('click',function(){ $(".ext_regerror").remove(); var hasError = hasError; var email = $("#email").val(); var valid = $("#valid").val(); var tmpcode = $("#valcode").val(); var reg_password1 = $("#reg_password1").val(); var reg_password2 = $("#reg_password2").val(); var passwordsVal = $("#reg_password1, #reg_password2").val(); if(passwordsVal == '') { hasError = true; $("#reg_password1, #reg_password2").after('
Enter your password
'); } else if ($("#reg_password1").val() != $("#reg_password2").val()) { hasError = true; $("#reg_password1, #reg_password2").after('
Your passwords do not match
'); } password1_length = reg_password1.length; if(reg_password1 != '' && password1_length < 6) { hasError = true; $("#reg_password1").after('
A password has a minimum of 6 characters
'); } var dataString = 'email='+ email + '&valid=' + valid + '&tmpcode=' + tmpcode + '®_password1=' + reg_password1; if (hasError == undefined) { $.ajax({ type: "POST", url: "/include/process/reg.external_val.inc.php", data: dataString, success: function(data){ if (data == '1'){ $(".setpwd_loader").show(); $(".ext_submit").hide(); window.location = "http://ont.drummerszone.com/members/settings/" + valid + "/"; } if (data == '2'){ } }, error: function(data){ } }); } }); if ($('#setpwd').length) { $("#overlay-fb, #dialog-fb").show(); $('#reg_password1').focus(); } } /* PASSWORD AND EMAIL CHECK FOR MEMBER ======================================*/ if ($('.kill_nav').length > 0) { $('a').each(function() { $('a').click(function () {return false;}); }); /* re-enable: $('a').unbind('click'); */ $(document).on( "click", ".update_acc", function() { var hasError = hasError; var updateType = $(this).attr('data'); $(".regerror").hide(); var addr = $("#addr").val(); var caddr = $("#caddr").val(); var email1 = $("#email1").val(); var email2 = $("#email2").val(); var reg_p1_new = $("#reg_p1_new").val(); var reg_p2_new = $("#reg_p2_new").val(); var viewName = $("#viewName").val(); if(updateType == "setemail") { var emailsVal = $("#email1, #email2").val(); if(emailsVal == '') { hasError = true; $(".update_acc").after('
Enter your email
'); } else if ($("#email1").val() != $("#email2").val()) { hasError = true; $(".update_acc").after('
Your emails do not match
'); } var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var mail_new = $("#email1").val(); if(!emailReg.test(mail_new)) { hasError = true; $(".update_acc").after('
Invalid email
'); } var file = '/include/process/member_insert_email.php'; } if(updateType == "screenName") { if(viewName == '') { hasError = true; $(".update_acc").after('
Enter your screen name
'); } var file = '/include/process/member_insert_screen_name.php'; } if(updateType == "passw") { if ($('#viewName').length > 0) { if(viewName == '') { hasError = true; $(".update_acc").after('
Enter your screen name
'); } } /* PASSWORD CHECK */ var passwordsVal = $("#reg_p1_new, #reg_p2_new").val(); if(passwordsVal == '') { hasError = true; $(".update_acc").after('
Enter your password
'); } else if ($("#reg_p1_new").val() != $("#reg_p2_new").val()) { hasError = true; $(".update_acc").after('
Your passwords do not match
'); } password1_length = reg_p1_new.length; if(reg_p1_new != '' && password1_length < 6) { hasError = true; $(".update_acc").after('
A password has a minimum of 6 characters
'); } var file = '/include/process/member_insert_login.php'; } if (hasError == undefined) { var dataString = 'addr='+ addr + '&pass=' + reg_p1_new + '&viewName=' + viewName + '&newMail=' + mail_new; //alert('string' + ' ' + dataString + ' ' + hasError); $.ajax({ type: "POST", url: file, data: dataString, success: function(data){ //alert(data); if(data == 1) { $('a').unbind('click'); $(".kill_nav").html( '

Congrats!

You have succesfully updated your account. Have fun on Drummersocial.com!

' ); } if(data == 2) { //alert('major error!' + ' ' + data); } if(data == 3) { $(".update_acc").after('
This screen name is already in use.
'); } if(data == 4) { $(".update_acc").after('
No special characters are allowed. Please use Aa-Zz, 0-9 and underscores or white spaces.
'); } if(data == 5) { $(".update_acc").after('
This email is already in use.
'); } if(data == 6) { $('a').unbind('click'); $(".kill_nav").html( '

Thank you!

You have a message in your mailbox asking you to confirm your email address.

Please, understand we can not give you full access until you confirm this email.

Have fun on Drummerszone.com!

' ); } }, error : function(data) { //alert('major error!' + ' ' + data); } }); } }); } /* END PASSWORD AND EMAIL CHECK FOR MEMBER ======================================*/ /* MODALS ======================================*/ var mpopup = document.getElementById('mpopupBox'); var mpLink = document.getElementById("ud_mss"); var close = document.getElementsByClassName("close")[0]; mpLink.onclick = function() { mpopup.style.display = "block"; } close.onclick = function() { mpopup.style.display = "none"; } window.onclick = function(event) { if (event.target == mpopup) { mpopup.style.display = "none"; } } /* end main modal */ /* signUpAlert */ $('.likeSignUp').live('click',function(){ $("#signUpAlert").show(); }); /* load NEWS videos in popDiv */ $('#newsbox_vid').live('click',function(){ var vidbook = $(this).attr('data'); //alert(vidbook); vidbook = vidbook.split('^'); var bookID = vidbook[0]; var mediaID = vidbook[1]; var file = vidbook[2]; var dataString = 'bookID='+ bookID + '&mediaID=' + mediaID + '&file=' + file; $(".vidBox, .vidView").show(); $.ajax({ type: "POST", url: "/news/inc.article.videos.overlay.php", data: dataString, success: function(data){ $(".vidView").html(data, {}, function(){ }); }, error : function(data) { } }); }); /* load videos in popDiv */ $('#albumbox_vid').live('click',function(){ var vidbook = $(this).attr('data'); vidbook = vidbook.split('-'); var bookID = vidbook[0]; var state = vidbook[1]; var mID = vidbook[2]; var type = vidbook[3]; var dataString = 'bookID='+ bookID + '&state=' + state + '&mID=' + mID; if(bookID != "empty") { $(".vidBox, .vidView").show(); $(".vidView").html('

Validating videos in this channel...

'); $.ajax({ type: "POST", url: "/members/inc.videos.profile.album.php", data: dataString, success: function(data){ $(".vidView").html(data, {}, function(){ }); }, error : function(data) { } }); } }); /* var myPlayer = videojs("channelplayer"); myPlayer.on("ready",function(){ //alert('The player is ready'); }); myPlayer.on("play",function(){ var vidID = $(this).attr('data-name'); //alert('The video has play' + ' ' + vidID); }); myPlayer.on("ended",function(){ //alert('The video has ended'); }); */ $('html').click(function() { $('.vidBox, .vidView, #signUpAlert, #anx-box,#bnx-box,#mix-box,#avx-box,#aix-box,.contentBox, #popsignup').hide(); var oldPlayer = document.getElementById('jwplayer'); videojs(oldPlayer).dispose(); $('#jwvideo').each(function(){ jwplayer('jwvideo').stop(); $('iframe').attr('src', $('iframe').attr('src')); var action = 1; var dataString = 'call='+ action; $.ajax({ type: "POST", url: "/include/process/inc.videos.sessions.php", data: dataString, success: function(data){ }, error : function(data) { } }); return false; }) }); $('.vidView').click(function(event) { event.stopPropagation(); }); $(window).load(function () { if ($('#channelplayer').length == 0){ var action = 3; var dataString = 'call='+ action; $.ajax({ type: "POST", url: "/include/process/inc.videos.sessions.php", data: dataString, success: function(data){ }, error : function(data) { } }); return false; } }); /* MEMBER PAGES */ if ($('#phHome').length){ $('#phHome').live('click',function(){ $('#phHome, #vidHome').hide(); $('#ph_upl').show(); $('#vid_upl').hide(); $('#frame').show(); $("#frame").attr("src", '/members/inc.upl_photo.php'); }); /* $("#ph_upl").load("/members/inc.upl_photo.php"); */ $('#vidHome').live('click',function(){ $('#phHome, #vidHome').hide(); $('#vid_upl').show(); $('#ph_upl').hide(); $('#frame_vid').show(); $("#frame_vid").attr("src", '/include/process/youtube/index.php'); }); $('#vidHome').live('click',function(){ $('#phHome, #vidHome').hide(); $('#vid_upl').show(); $('#ph_upl').hide(); }); /* $('#photo_upl').live('click',function(){ var description = $("#description").val(); var userfile = $("#userfile").val(); var content = $("#content").val(); var dataString = 'description='+ description + '&userfile=' + userfile + '&content=' + content; var myUpload = $('#userfile').upload({ name: 'image', action: '/members/inc.upload.photo.php', enctype: 'multipart/form-data', params: {upload:'Upload'}, autoSubmit: true, onSubmit: function() { $('#upload_status').html('').hide(); loadingmessage('Please wait, uploading file...', 'show'); }, onComplete: function(response) { //alert('ok dan!'); } }); $.ajax({ type: "POST", url: "/members/inc.upload.photo.php", data:dataString, success : function(data) { //alert('ok dan!'); }, error : function(data) { //alert('nee dan!'); } }); }); */ } /* load edits */ $("#signupgo").click(function(){ document.location.href = "/connect"; }); if($('#settings').length){ var content = $(this).attr('id'); $('.spa').live('click',function() { var content = $(this).attr('id'); var subcontent = $(".lpa").attr('id'); if(content == "s_general") { $(".spa").not(this).css({ 'background-color': '', 'color': '#333' }); $("#s_general").css({ 'background-color': '#333', 'color': '#fff' }); $("#s_panel").load("/members/inc.s.general.php"); } if(content == "s_about") { $(".spa").not(this).css({ 'background-color': '', 'color': '#333' }); $("#s_about").css({ 'background-color': '#333', 'color': '#fff ' }); $("#s_panel").load("/members/inc.s.profile.php"); } if(content == "s_highlights") { $(".spa").not(this).css({ 'background-color': '', 'color': '#333' }); $("#s_highlights").css({ 'background-color': '#333', 'color': '#fff' }); $("#s_panel").load("/members/inc.s.highlights.php"); } if(content == "s_websites") { $(".spa").not(this).css({ 'background-color': '', 'color': '#333' }); $("#s_websites").css({ 'background-color': '#333', 'color': '#fff' }); $("#s_panel").load("/members/inc.s.websites.php"); } if(content == "s_gear") { $(".spa").not(this).css({ 'background-color': '', 'color': '#333' }); $("#s_gear").css({ 'background-color': '#333', 'color': '#fff' }); $("#s_panel").load("/members/inc.s.gear.php"); } if(content == "s_likes") { $(".spa").not(this).css({ 'background-color': '', 'color': '#333' }); $("#s_likes").css({ 'background-color': '#333', 'color': '#fff' }); $("#s_panel").load("/members/inc.s.likes.main.php", {}, function(){ $("#l_panel").load("/members/inc.s.likes.artists.php"); }); } if(content == "s_friends") { $(".spa").not(this).css({ 'background-color': '', 'color': '#333' }); $("#s_friends").css({ 'background-color': '#333', 'color': '#fff' }); $("#s_panel").load("/members/inc.s.likes.friends.php"); } if(content == "s_photos") { $(".spa").not(this).css({ 'background-color': '', 'color': '#333' }); $("#s_photos").css({ 'background-color': '#333', 'color': '#fff' }); $("#s_panel").load("/members/inc.s.photos.albums.php"); } if(content == "s_videos") { $(".spa").not(this).css({ 'background-color': '', 'color': '#333' }); $("#s_videos").css({ 'background-color': '#333', 'color': '#fff' }); $("#s_panel").load("/members/inc.s.video.albums.php"); } if(content == "s_account") { $(".spa").not(this).css({ 'background-color': '', 'color': '#333' }); $("#s_account").css({ 'background-color': '#333', 'color': '#fff' }); $("#s_panel").load("/members/inc.s.account.php"); } }); if(content === undefined) { $("#s_panel").load("/members/inc.s.home.php"); /*/inc.s.home*/ } /* show like pages */ $('.lpa').live("click",function() { var hash = this.hash; if(hash === "#a") { $("#s_panel").load("/members/inc.s.likes.main.php", {}, function(){ $("#l_panel").load("/members/inc.s.likes.artists.php"); }); } if(hash === "#m") { $("#s_panel").load("/members/inc.s.likes.main.php", {}, function(){ $("#l_panel").load("/members/inc.s.likes.music.php"); }); } if(hash === "#r") { $("#s_panel").load("/members/inc.s.likes.main.php", {}, function(){ $("#l_panel").load("/members/inc.s.likes.releases.php"); }); } if(hash === "#s") { $("#s_panel").load("/members/inc.s.likes.main.php", {}, function(){ $("#l_panel").load("/members/inc.s.likes.tracks.php"); }); } }); $('.l_shwmr').live("click",function() { var ID = $(this).attr("id"); if(ID) { $("#more"+ID).html(''); $.ajax({ type: "POST", url: "/members/inc.s.likes.artists.more.php", data: "lastmsg="+ ID, cache: false, success: function(html){ $(".l_blockapp").append(html); $("#more"+ID).remove(); $(".l_shwmr"+ID).remove(); } }); } }); $('.lm_shwmr').live("click",function() { var ID = $(this).attr("id"); if(ID) { $("#more"+ID).html(''); $.ajax({ type: "POST", url: "/members/inc.s.likes.music.more.php", data: "lastmsg="+ ID, cache: false, success: function(html){ $(".l_blockapp").append(html); $("#more"+ID).remove(); $(".l_shwmr"+ID).remove(); } }); } }); $('.lr_shwmr').live("click",function() { var ID = $(this).attr("id"); if(ID) { $("#more"+ID).html(''); $.ajax({ type: "POST", url: "/members/inc.s.likes.releases.more.php", data: "lastmsg="+ ID, cache: false, success: function(html){ $(".l_blockapp").append(html); $("#more"+ID).remove(); $(".lr_shwmr"+ID).remove(); } }); } }); $('.lmem_shwmr').live("click",function() { var ID = $(this).attr("id"); if(ID) { $("#more"+ID).html(''); $.ajax({ type: "POST", url: "/members/inc.s.likes.friends.more.php", data: "lastmsg="+ ID, cache: false, success: function(html){ $(".l_blockapp").append(html); $("#more"+ID).remove(); $(".lmem_shwmr"+ID).remove(); } }); } }); $('#reg_an').live('click',function(){ $('.s_help_an').show(); }); $('#addmail').live('click',function(){ $('#newmail, #newweb').show(); }); $('#delmail').live('click',function() { var delItem = $(this).attr('data-section'); delItem = delItem.split('-'); var first = delItem[0]; var second = delItem[1]; var dataString = 'first='+ first + '&second=' + second; $.ajax({ type: "POST", url: "/include/process/sp.maildel.inc.php", data: dataString, success: function(){ $("#s_panel").load("/members/inc.s.general.php"); }, error : function(data) { } }); }); $('#reg_email2').live('click',function() { $(this).val('') }); $('#reg_email_snd').live('click',function() { var reg_email2 = $("#reg_email2").val(); var dataString = 'reg_email2='+ reg_email2; var hasError = hasError; var email_snd = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var emailaddressVal = $("#reg_email2").val(); if(emailaddressVal == '') { hasError = true; $("#reg_email2").val('Invalid email'); } else if(!email_snd.test(emailaddressVal)) { hasError = true;$("#reg_email2").val('Invalid email'); } if (hasError == undefined) { $.ajax({ type: "POST", url: "/include/process/sp.mailins.inc.php", data: dataString, success: function(){ $("#s_panel").load("/members/inc.s.general.php"); }, error : function(data) { } }); } }); $('#save_contact').live('click',function() { $('.regerror').hide(); var artistNameCount = $("#reg_an").attr('artistname-count'); var artistNameOld = $("#reg_an").attr('artistname-current'); var hasError = hasError; var reg_fn = $("#reg_fn").val(); var reg_ln = $("#reg_ln").val(); var reg_an = $("#reg_an").val(); var reg_anCnt = artistNameCount; var reg_sex = $("#reg_sex").val(); var reg_country = $("#reg_country").val(); var reg_day = $("#reg_day").val(); var reg_month = $("#reg_month").val(); var reg_year = $("#reg_year").val(); var date = $('#reg_year').val() + '-' + $('#reg_month').val() + '-' + $('#reg_day').val(); var reg_address = $("#reg_address").val(); var reg_zip = $("#reg_zip").val(); var reg_city = $("#reg_city").val(); var reg_mobile = $("#reg_mobile").val(); var dataString = 'reg_fn='+ reg_fn + '®_ln=' + reg_ln + '®_an=' + reg_an + '®_anCnt=' + reg_anCnt + '&artistNameOld=' + artistNameOld + '®_sex=' + reg_sex + '®_country=' + reg_country + '®_month=' + reg_month + '®_day=' + reg_day + '®_year=' + reg_year + '&date=' + date + '®_address=' + reg_address + '®_zip=' + reg_zip + '®_city=' + reg_city + '®_mobile=' + reg_mobile; if(reg_fn == '') { hasError = true; $("#reg_fn").after('
Give your first name
'); } if(reg_an == '') { hasError = true; $("#reg_an").after('
We recommend to use a public profile name. This can be your real name as well.
'); } if(reg_ln == '') { hasError = true; $("#reg_ln").after('
Give your last name
'); } if (!$("input[@name='reg_sex']:checked").val()) { hasError = true; $("#sexe").show(); } if ($("input[@name='reg_sex']:checked").val()) { $("#sexe").hide(); } if(reg_country == '') { hasError = true; $("#reg_country").after('
Select your country as well.
'); } if(reg_month == '' || reg_day == '' || reg_year == '') { hasError = true; $("#reg_year").after('
Enter your birthday.
'); } else { var date = $('#reg_year').val() + '-' + $('#reg_month').val() + '-' + $('#reg_day').val(); $("#err_date").hide();} var age = 13; var mydate = new Date(); mydate.setFullYear(reg_year, reg_month-1, reg_day); var currdate = new Date(); currdate.setFullYear(currdate.getFullYear() - age); if ((currdate - mydate) < 0) { hasError = true; $("#reg_year").after('
You have to be at least 13 years old.
'); } else { } if (hasError == undefined) { $.ajax({ type: "POST", url: "/include/process/sp.contact.inc.php", data: dataString, success: function(){ $("#s_panel").load("/members/inc.s.general.php", {}, function(){ $('.s_help_succ').show(); }); }, error : function(data) { } }); } }); $('#save_profile').live('click',function() { var hasError = hasError; var reg_niveau = $("#reg_niveau").val(); var reg_speeljaren =$("#reg_speeljaren").val(); var reg_opleiding = $("#reg_opleiding").val(); var reg_inband = $('input[name=reg_inband]:checked').val() var reg_beschikbaar=$('input[name=reg_beschikbaar]:checked').val() var reg_leraar = $('input[name=reg_leraar]:checked').val() var reg_bio_eng = $("#reg_bio_eng").val(); var dataString = 'reg_niveau='+ reg_niveau + '®_speeljaren=' + reg_speeljaren + '®_opleiding=' + reg_opleiding + '®_inband=' + reg_inband + '®_beschikbaar=' + reg_beschikbaar + '®_leraar=' + reg_leraar + '®_bio_eng=' + reg_bio_eng; if (hasError == undefined) { $.ajax({ type: "POST", url: "/include/process/sp.profile.inc.php", data: dataString, success: function(){ $("#s_panel").load("/members/inc.s.profile.php", {}, function(){ $('.s_help_succ').show(); }); }, error : function(data) { } }); } }); $('#reg_websiteurl').live('click',function() { $(this).val('') }); $('#reg_website_snd').live('click',function() { var reg_websitetitle = $("#reg_websitetitle").val(); var reg_websiteurl = $("#reg_websiteurl").val(); var dataString = 'reg_websitetitle='+ reg_websitetitle + '®_websiteurl=' + reg_websiteurl; if(reg_websiteurl == '') { hasError = true; $("#reg_websiteurl").val('Invalid website'); } if (reg_websiteurl != '') { $.ajax({ type: "POST", url: "/include/process/sp.websiteins.inc.php", data: dataString, success: function(){ $("#s_panel").load("/members/inc.s.websites.php"); }, error : function(data) { } }); } }); $('#del_websiteurl').live('click',function() { var delItem = $(this).attr('data-section'); delItem = delItem.split('-'); var first = delItem[0]; var second = delItem[1]; var dataString = 'first='+ first + '&second=' + second; $.ajax({ type: "POST", url: "/include/process/sp.websitedel.inc.php", data: dataString, success: function(){ $("#s_panel").load("/members/inc.s.websites.php"); }, error : function(data) { //alert('nope ' + first + ' ' + second ); } }); }); $('input[id^=brand]').live('click',function() { var brandNR = $(this).attr('id'); var brandValue = $(this).attr('value'); var brandName = $(this).attr('name'); var dataString = 'brandNR='+ brandNR + '&brandValue=' + brandValue + '&brandName=' + brandName; $.ajax({ type: "POST", url: "/include/process/sp.gearupdate.inc.php", data: dataString, success: function(){ $("#s_panel").load("/members/inc.s.gear.php"); }, error : function(data) { //alert('nope'); } }); }); $('.s_unlike').live('click',function() { var delItem = $(this).attr('id'); delItem = delItem.split('-'); var first = delItem[0]; var second = delItem[1]; var dataString = 'first='+ first + '&second=' + second; $.ajax({ type: "POST", url: "/include/process/sp.gearunlike.inc.php", data: dataString, success: function(){ $("#s_panel").load("/members/inc.s.gear.php"); }, error : function(data) { } }); }); /* hover function all like-sections */ $('.l_block, .l_block_ul').live('hover',function() { $(this).find(".la_unlike, .la_relike,.lm_unlike, .lm_relike,.lr_unlike, .lr_relike,.lmem_unlike, .lmem_relike,").fadeToggle('fast'); }); /* artists */ $('.la_unlike, .la_relike').live('click',function() { var delItem = $(this).attr('id'); var motherID = $(this).closest(".l_block, .l_block_ul").attr('id'); delItem = delItem.split('-'); var first = delItem[0]; var second = delItem[1]; var third = delItem[2]; var dataString = 'first='+ first + '&second=' + second + '&third=' + third + '&motherID=' + motherID; $.ajax({ type: "POST", url: "/include/process/sp.artistlikeupd.inc.php", cache: false, data: dataString, success: { }, error : function(data) { } }); $(this).closest("div:.l_block, div:.l_block_ul").slideUp('fast'); $("div:#replace" + motherID).load('/members/inc.s.likes.artists.upd.php?parameter=' + motherID + ''); }); $('input[id=l_upd]:checked').live('click',function() { $(".updmsg").hide(); var motherID = $(this).closest(".la_status").attr('id'); var value = $(this).attr("value"); motherID = motherID.split('-'); var favID = motherID[0]; var artistID = motherID[1]; value = value.split('-'); var mfsID = value[0]; var mfs_cat = value[1]; var dataString = 'favID='+ favID + '&artistID=' + artistID + '&mfsID=' + mfsID + '&mfs_cat=' + mfs_cat; $.ajax({ type: "POST", url: "/include/process/sp.artistlikestatusupd.inc.php", data: dataString, success: { }, error : function(data) { } }); $("#msg" + artistID).show(200); $("#msg" + artistID).toggle(1500); }); $('input[id=l_upd]:not(:checked)').live('click',function() { $(".updmsg").hide(); var mainID = $(this).closest(".l_block").attr('id'); var motherID = $(this).closest(".la_status").attr('id'); motherID = motherID.split('-'); var favID = motherID[0]; var artistID = motherID[1]; var artistStatus = $(this).attr('value'); artistStatus = artistStatus.split('-'); var mfas_mfsID = artistStatus[0]; var mfas_cat = artistStatus[1]; var dataString = 'favID='+ favID + '&artistID=' + artistID + '&uncheck=' + 'uncheck' + '&mfas_mfsID=' + mfas_mfsID + '&mfas_cat=' + mfas_cat; $.ajax({ type: "POST", url: "/include/process/sp.artistlikestatusupd.inc.php", data: dataString, success: function (response) { $("#remove-"+mainID).slideUp('fast'); $("div:#replace" + mainID).load('/members/inc.s.likes.artists.upd.php?parameter=' + mainID + ''); }, error : function(data) { } }); $("#msg" + artistID).show(200); $("#msg" + artistID).toggle(1500); }) /* music */ $('.lm_unlike, .lm_relike').live('click',function() { var delItem = $(this).attr('id'); var motherID = $(this).closest(".l_block, .l_block_ul").attr('id'); delItem = delItem.split('-'); var first = delItem[0]; var second = delItem[1]; var third = delItem[2]; var dataString = 'first='+ first + '&second=' + second + '&third=' + third + '&motherID=' + motherID; $.ajax({ type: "POST", url: "/include/process/sp.musiclikeupd.inc.php", cache: false, data: dataString, success: { }, error : function(data) { } }); $(this).closest("div:.l_block, div:.l_block_ul").slideUp('fast'); $("div:#replace" + motherID).load('/members/inc.s.likes.music.upd.php?parameter=' + motherID + ''); }); $('input[id=lm_upd]:checked').live('click',function() { $(".updmsg").hide(); var motherID = $(this).closest(".lb_status").attr('id'); var value = $(this).attr("value"); motherID = motherID.split('-'); var favID = motherID[0]; var artistID = motherID[1]; value = value.split('-'); var mfsID = value[0]; var mfs_cat = value[1]; var dataString = 'favID='+ favID + '&artistID=' + artistID + '&mfsID=' + mfsID + '&mfs_cat=' + mfs_cat; $.ajax({ type: "POST", url: "/include/process/sp.musiclikestatusupd.inc.php", data: dataString, success: { }, error : function(data) { /* alert('nope!!!');*/} }); $("#msg" + artistID).show(200); $("#msg" + artistID).toggle(1500); }); $('input[id=lm_upd]:not(:checked)').live('click',function() { $(".updmsg").hide(); var mainID = $(this).closest(".l_block").attr('id'); var motherID = $(this).closest(".lb_status").attr('id'); motherID = motherID.split('-'); var favID = motherID[0]; var artistID = motherID[1]; var artistStatus = $(this).attr('value'); artistStatus = artistStatus.split('-'); var mfbs_mfsID = artistStatus[0]; var mfbs_cat = artistStatus[1]; var dataString = 'favID='+ favID + '&artistID=' + artistID + '&uncheck=' + 'uncheck' + '&mfbs_mfsID=' + mfbs_mfsID + '&mfbs_cat=' + mfbs_cat; $.ajax({ type: "POST", url: "/include/process/sp.musiclikestatusupd.inc.php", data: dataString, success: function (response) { $(this).closest("div:.l_block").slideUp('fast'); $("div:#replace" + mainID).load('/members/inc.s.likes.music.upd.php?parameter=' + mainID + ''); }, error : function(data) { } }); $("#msg" + artistID).show(200); $("#msg" + artistID).toggle(1500); }) /* releases */ $('.lr_unlike, .lr_relike').live('click',function() { var delItem = $(this).attr('id'); var motherID = $(this).closest(".l_block, .l_block_ul").attr('id'); delItem = delItem.split('-'); var first = delItem[0]; var second = delItem[1]; var third = delItem[2]; var dataString = 'first='+ first + '&second=' + second + '&third=' + third + '&motherID=' + motherID; $.ajax({ type: "POST", url: "/include/process/sp.releaseslikeupd.inc.php", cache: false, data: dataString, success: { }, error : function(data) { } }); $(this).closest("div:.l_block, div:.l_block_ul").slideUp('fast'); $("div:#replace" + motherID).load('/members/inc.s.likes.releases.upd.php?parameter=' + motherID + ''); }); $('input[id=lr_upd]:checked').live('click',function() { $(".updmsg").hide(); var motherID = $(this).closest(".lr_status").attr('id'); var value = $(this).attr("value"); motherID = motherID.split('-'); var favID = motherID[0]; var artistID = motherID[1]; value = value.split('-'); var mfsID = value[0]; var mfs_cat = value[1]; var dataString = 'favID='+ favID + '&artistID=' + artistID + '&mfsID=' + mfsID + '&mfs_cat=' + mfs_cat; $.ajax({ type: "POST", url: "/include/process/sp.releaseslikestatusupd.inc.php", data: dataString, success: { }, error : function(data) { //alert('nope!!!'); } }); $("#msg" + artistID).show(200); $("#msg" + artistID).toggle(1500); }); $('input[id=lr_upd]:not(:checked)').live('click',function() { $(".updmsg").hide(); var mainID = $(this).closest(".l_block").attr('id'); var motherID = $(this).closest(".lr_status").attr('id'); motherID = motherID.split('-'); var favID = motherID[0]; var artistID = motherID[1]; var artistStatus = $(this).attr('value'); artistStatus = artistStatus.split('-'); var mfrs_mfsID = artistStatus[0]; var mfrs_cat = artistStatus[1]; var dataString = 'favID='+ favID + '&artistID=' + artistID + '&uncheck=' + 'uncheck' + '&mfrs_mfsID=' + mfrs_mfsID + '&mfrs_cat=' + mfrs_cat; $.ajax({ type: "POST", url: "/include/process/sp.releaseslikestatusupd.inc.php", data: dataString, success: function (response) { $(this).closest("div:.l_block").slideUp('fast'); $("div:#replace" + mainID).load('/members/inc.s.likes.releases.upd.php?parameter=' + mainID + ''); }, error : function(data) { } }); $("#msg" + artistID).show(200); $("#msg" + artistID).toggle(1500); }) /* tracks */ $('.st_trck').live('hover',function() { var st_trckID = $(this).attr('id'); $("#unlike-"+st_trckID).hover(function(){ $("#unlike-"+st_trckID).show(); }); $("#unlike-"+st_trckID).fadeToggle(); }); $(".lt_unlike").live('click',function() { var delItem = $(this).attr('id'); delItem = delItem.split('-'); var first = delItem[0]; var second = delItem[1]; var dataString = 'first='+ first + '&second=' + second; $.ajax({ type: "POST", url: "/include/process/sp.trackslikeupd.inc.php", data: dataString, success: { }, error : function(data) { } }); $(this).closest(".st_trck").slideUp('1000'); }); /* friends */ $(".lmem_unlike,.lmem_relike").live('click',function() { var delItem = $(this).attr('id'); var motherID = $(this).closest(".l_block, .l_block_ul").attr('id'); delItem = delItem.split('-'); var first = delItem[0]; var second = delItem[1]; var third = delItem[2]; var dataString = 'first='+ first + '&second=' + second + '&third=' + third; $.ajax({ type: "POST", url: "/include/process/sp.friendslikeupd.inc.php", cache: false, data: dataString, success: { }, error : function(data) { } }); $(this).closest("div:.l_block, div:.l_block_ul").slideUp('fast'); $("div:#replace" + motherID).load('/members/inc.s.likes.friends.upd.php?parameter=' + motherID + ''); }); $('input[id=lmem_upd]:checked').live('click',function() { var motherID = $(this).closest(".lmem_status").attr('id'); var value = $(this).attr("value"); motherID = motherID.split('-'); var favID = motherID[0]; var artistID = motherID[1]; value = value.split('-'); var mfsID = value[0]; var mfs_cat = value[1]; var dataString = 'favID='+ favID + '&artistID=' + artistID + '&mfsID=' + mfsID + '&mfs_cat=' + mfs_cat; $(".updmsg").hide(); var motherID = $(this).closest(".lmem_status").attr('id'); var value = $(this).attr("value"); motherID = motherID.split('-'); var favID = motherID[0]; var artistID = motherID[1]; value = value.split('-'); var mfsID = value[0]; var mfs_cat = value[1]; var dataString = 'favID='+ favID + '&artistID=' + artistID + '&mfsID=' + mfsID + '&mfs_cat=' + mfs_cat; $.ajax({ type: "POST", url: "/include/process/sp.friendslikestatusupd.inc.php", data: dataString, success: { }, error : function(data) { //alert('nope!!!'); } }); $("#msg" + artistID).show(200); $("#msg" + artistID).toggle(1500); }); $('input[id=lmem_upd]:not(:checked)').live('click',function() { $(".updmsg").hide(); var mainID = $(this).closest(".l_block").attr('id'); var motherID = $(this).closest(".lmem_status").attr('id'); motherID = motherID.split('-'); var favID = motherID[0]; var artistID = motherID[1]; var artistStatus = $(this).attr('value'); artistStatus = artistStatus.split('-'); var mfas_mfsID = artistStatus[0]; var mfas_cat = artistStatus[1]; var dataString = 'favID='+ favID + '&artistID=' + artistID + '&uncheck=' + 'uncheck' + '&mfas_mfsID=' + mfas_mfsID + '&mfas_cat=' + mfas_cat; $.ajax({ type: "POST", url: "/include/process/sp.friendslikestatusupd.inc.php", data: dataString, success: function (response) { }, error : function(data) { } }); $("#msg" + artistID).show(200); $("#msg" + artistID).toggle(1500); }) /* manage photos / videos */ $('#phHome').live('click',function(){ $('#phHome, #phBook').hide(); $('#ph_upl').show(); $('#vid_upl').hide(); $('#frame').show(); $("#frame").attr("src", '/members/inc.upl_photo.php'); }); /* $("#ph_upl").load("/members/inc.upl_photo.php"); */ $('#phBook').live('click',function(){ $('#phHome, #phBook').hide(); $('#ph_newbk').show(); $('#reg_atitle').focus(); }); $('#phBcncl').live('click',function(){ $('#ph_newbk, #vid_newbk').hide(); $('#phHome, #phBook, #vidHome, #vidBook, #ac_1, #ac_2, #ac_3, #ac_4').show(); $(".reg").val('') }) $('#vidHome').live('click',function(){ $('#ac_1, #ac_2, #ac_3, #ac_4,#vid_yt_search, .s_help_succ').hide(); $('#vid_upl').show(); $('#ph_upl').hide(); $('#frame_vid').show(); $("#frame_vid").attr("src", '/include/process/youtube/index.php'); }); $('#vidBook').live('click',function(){ $('#ac_1, #ac_2, #ac_3, #ac_4,#vid_yt_search, .s_help_succ').hide(); $('#vid_newbk').show(); $('#vid_upl').hide(); }); $('.searchyt').live('click',function(){ $('.searchyt').css("color","#333"); $('#ac_1, #ac_2, #ac_3, #vidYT').hide(); var yt_search_default = this.value; $('.searchyt').live('focusin',function () { if (this.value === this.defaultValue) { this.value = ''; } }); $('.searchyt').live('focusout',function () { if (this.value === '') { this.value = this.defaultValue; $('#ac_1, #ac_2, #ac_3, #vidYT').show(); $('#vid_yt_search_err').slideUp('slow'); } }); $('#yt_search').val(''); }); $('.searchyt').live('keyup',function(){ var ytFcnt = $(".searchyt").val(); yt_search_length = ytFcnt.length; if(yt_search_length > 2) { $('#vidYT').show(); $('#vid_yt_search_err').slideUp('slow'); } }); $('#vidYT').live('click',function(){ var x = $( '.searchyt' ).prop( 'defaultValue' ); var search = $('#yt_search').val(); var dataString = 'search='+ search; if(search == x) { $('#vid_yt_search_err').show(); } if(search != x) { $('#album_container').hide(); $('#vid_yt_search').show(); $("#vid_yt_search").load( '/members/inc.s.videos.yt.search.php', { 'yt_passsearch': search },function() { if ($("#yts_scroll_nxt").html().length > 0) { $('#vid_yt_loading').hide(); } }); } }) $('#yt_search').live('keypress',function(e){ if(e.which == 13){ $('#vidYT').live('click',function(){ var x = $( '.searchyt' ).prop( 'defaultValue' ); var search = $('#yt_search').val(); if(search != x) { $('#vid_yt_loading').show(); } }); } }); $('#yts_scroll_nxt, #yts_scroll_pre').live('click',function(){ $('#vid_yt_loading').show().delay(2000).fadeOut(); var yt_paging = $(this).attr('data'); yt_paging = yt_paging.split('-'); var start = yt_paging[0]; var paged_max = yt_paging[1]; var passsearch = yt_paging[2]; var dataString = 'yt_start='+ start + '&yt_paged_max=' + paged_max + '&yt_passsearch=' + passsearch; $("#vid_yt_search").load( "/members/inc.s.videos.yt.search.php", { 'yt_start': start, 'yt_paged_max': paged_max, 'yt_passsearch': passsearch } ); $('html, body').animate({ scrollTop: $('#aytv').offset().top }, 'slow'); return false; }); $('.yt_add_vid').live('click',function(){ var addItem = $(this).attr('id'); var selectVal = $('#album'+addItem + ' :selected').val(); var dataString = 'ytid='+ addItem + '&bookid=' + selectVal; $.ajax({ type: "POST", url: "/include/process/like_video_yt.php", cache: false, data: dataString, success: function(data){ if(data == 1) { $("div:#yvr_add"+addItem).css('background-color', '#99CC00').html('Successfully added to your personal albums.'); } }, error : function(data) { //alert('oops'); } }); }); $('#phBk').live('click',function(){ var type = $(this).attr('data-section'); var a_title = $(".regfield").val() var dataString = 'a_title='+ a_title + '&type=' + type; if (a_title != '') { if (type == 'photo') { var loadUrl = '/members/inc.s.photos.albums.php'; } if (type == 'video') { var loadUrl = '/members/inc.s.video.albums.php'; } $.ajax({ type: "POST", url: "/include/process/sp.photo_album_ins.inc.php", data: dataString, success: function(data){ if(data == 1) { $('#s_panel').load(''+loadUrl+'', {}, function(){ $('.s_help_succ').show(); }); } if(data == 2) { } }, error : function(data) { } }); } /* $.ajax({ type: "POST", url: "/include/process/sp.photo_album_ins.inc.php", data: dataString, success: function(){ $("#s_panel").load("/members/inc.s.profile.php", {}, function(){ $('.s_help_succ').show(); }); }, error : function(data) { } }); $('#ph_newbk').hide(); $('#phHome, #phBook').show(); */ }) $('.albumbox').live('click',function(){ var book = $(this).attr('data'); book = book.split('-'); var bookID = book[0]; var state = book[1]; var type = book[2]; var dataString = 'bookID='+ bookID + '&state=' + state; if(type === "v") { go_url = "/members/inc.s.videos.php"; } if(type === "p") { go_url = "/members/inc.s.photos.php"; } if(state === "1") { $.ajax({ type: "POST", url: go_url, data: "lastmsg="+ bookID, cache: false, success: function(data){ $("#album_container").html(data); } }); } if(state === "pp") { $.ajax({ type: "POST", url: go_url, data: "lastmsg="+ bookID, cache: false, success: function(data){ $("#album_container").html(data); } }); } if(state === "0") { } }); $('#setdate').live('click',function(){ var dateid = $(this).attr('data'); $('#setdate'+dateid).toggle(); $('#savetxt'+dateid).show(); }); $('.ptop: input').live('click',function(){ var msgid = $(this).attr('id'); var editID = msgid; var newmsgid = ( editID.replace('img_title', '') ); $('#savetxt'+newmsgid).show('slow'); }); $('.ptop: textarea').live('click',function(){ var msgid = $(this).attr('id'); var editID = msgid; var newmsgid = ( editID.replace('img_descr', '') ); $('#savetxt'+newmsgid).show('slow'); }); $('.s_head_sub img').live('click',function(){ $(".hl_box").toggle(200); }); $('#imgupd').live('click',function(){ var imgVals = $(this).attr('data'); var panelVals = $(this).closest(".albumview").attr('holder'); imgVals = imgVals.split('-'); var action = imgVals[0]; var imgid = imgVals[1]; var title = $("#img_title"+imgid).attr('value'); var description = $("#descr"+imgid).attr('value'); title = encodeURIComponent(title); var reg_day = $("#reg_day"+imgid).val(); var reg_month = $("#reg_month"+imgid).val(); var reg_year = $("#reg_year"+imgid).val(); var date = reg_year + '-' + reg_month + '-' + reg_day; var dataString = 'action='+ action + '&imgid=' + imgid + '&title=' + title + '&description=' + description + '&date=' + date; if(action == 'del') { $(".confirmBoxPhoto, .confirmViewPhoto").show(); $("#dAbrt").click(function(){ $(".confirmBoxPhoto, .confirmViewPhoto").hide(); }); $("#dConf").click(function(){ $.ajax({ type: "POST", url: "/include/process/sp.img.upd.inc.php", data: dataString, success: function (data) { if(data == 1) { } if(data == 2) { $(".confirmBoxPhoto, .confirmViewPhoto").hide(); $('[holder^=' + panelVals + ']').slideUp('3000'); } if(data == 3) { } }, error : function(data) { } }); }); } if(action == 'upd') { $.ajax({ type: "POST", url: "/include/process/sp.img.upd.inc.php", data: dataString, success: function (data) { if(data == 1) { $("#msg" + imgid).show(200); $("#msg" + imgid).toggle(3000); } if(data == 2) { } else { } }, error : function(data) { } }); } }); $("#makeEdit span, .s_head_subimg").live("click", function() { var bookNR = $("#makeEdit").attr('data'); var default_title = $("#makeEdit span").text(); $(".s_head_subimg").hide(); $("#makeEdit span").replaceWith("
save new title
"); $("#booktitle").focus(); return false; }); $(".updTitle").live("click", function() { var bookNR = $(this).attr('id'); var default_title = $(this).attr('data'); var new_title = $("#booktitle").val(); if(default_title == new_title) { } else { new_title = encodeURIComponent(new_title); var dataString = 'bookNR='+ bookNR + '&new_title=' + new_title; $.ajax({ type: "POST", url: "/include/process/sp.album.upd.inc.php", data: dataString, success: function (data) { if(data == 1) { $('.s_head_subimg').hide(); $("#msg" + bookNR).show(200); $("#msg" + bookNR).toggle("3000",function(){ if ($(this).is(':hidden')) { $('.s_head_subimg').show(); } else {} }); } if(data == 2) { $('.s_head_subimg').show(); } else { } }, error : function(data) { } }); } }); $('html:not(input#booktitle)').live('click',function() { $("input.reg").replaceWith("" + $("#booktitle").val() + ""); $(".updTitle").remove(); $(".s_head_subimg").show(); }); $("input.reg").live('click',function(event) { event.stopPropagation(); }); $('#vidupd').live('click',function(){ var imgVals = $(this).attr('data'); var panelVals = $(this).closest(".albumview").attr('holder'); imgVals = imgVals.split('-'); var action = imgVals[0]; var imgid = imgVals[1]; var title = $("#img_title"+imgid).attr('value'); title = encodeURIComponent(title); var descr = $("#img_descr"+imgid).attr('value'); descr = encodeURIComponent(descr); var reg_day = $("#reg_day"+imgid).val(); var reg_month = $("#reg_month"+imgid).val(); var reg_year = $("#reg_year"+imgid).val(); var date = reg_year + '-' + reg_month + '-' + reg_day; var dataString = 'action='+ action + '&imgid=' + imgid + '&title=' + title + '&descr=' + descr + '&date=' + date; if(action == 'del') { $(".confirmBoxPhoto, .confirmViewPhoto").show(); $("#dAbrt").click(function(){ $(".confirmBoxPhoto, .confirmViewPhoto").hide(); }); $("#dConf").click(function(){ $.ajax({ type: "POST", url: "/include/process/sp.vid.upd.inc.php", data: dataString, success: function (data) { if(data == 1) { } if(data == 2) { $(".confirmBoxPhoto, .confirmViewPhoto").hide(); $('[holder^=' + panelVals + ']').slideUp('3000'); } if(data == 3) { } }, error : function(data) { } }); }); } if(action == 'upd') { $.ajax({ type: "POST", url: "/include/process/sp.vid.upd.inc.php", data: dataString, success: function (data) { if(data == 1) { $("#msg" + imgid).show(200); $("#msg" + imgid).toggle(3000); } if(data == 2) { } else { } }, error : function(data) { } }); } }); $('.albumbox-empty').live('hover',function(){ var boxID = ""; delete boxID; $(this).find('.albumbox_overlay').slideToggle('fast'); $(this).find('.albumbox_overlay_none').slideToggle('fast'); $($(this).find('.albumbox_overlay_none')).live('click',function(){ var boxID = $(this).attr('data'); $("#confirmBox-"+boxID).show(); $("#confirmView-"+boxID).show(); $(".s_cancel").click(function(){ $("#confirmBox-"+boxID).hide(); $("#confirmView-"+boxID).hide(); }); $(".s_submit").click(function(){ var boxNR = $(this).attr('nr'); $("#confirmBox-"+boxID).hide(); $("#confirmView-"+boxID).hide(); var dataString = 'bookID='+ boxNR; $.ajax({ type: "POST", url: "/include/process/sp.album.del.inc.php", data: dataString, success: function (data) { if(data == 1) { $("#albumbox"+ boxNR).hide("slow"); } if(data == 2) { } else { } }, error : function(data) { } }); }); }); }); function hide_s_opt_pwd() { $('.s_opt_pwd').hide(); $("#reg_password, #reg_password1, #reg_password2").val(''); } function hide_s_opt_acc() { $('input[id="mp_account"][type="radio"]:checked').each(function(){ $(this).attr("checked", false); }); $(".s_opt_suspend, .s_opt_delete, .s_opt_delete_mail").hide(); $("#reg_susp, #reg_del").attr('checked', false); } $('.s_opt_head .open').live('click',function(){ $('.s_succ').hide(); var editVal = $(this).html(); var panel = this.id; $('div#'+panel).toggle('fast'); $('.s_opt_panel').not('div#'+panel).slideUp('fast'); $('.s_opt_panel_out').not('div#'+panel).slideDown('fast'); $('.open').html('edit'); $(this).html('close'); if (editVal === "close") { $(this).html('edit'); } hide_s_opt_pwd(); hide_s_opt_acc(); }); /* account settings */ $(".buttonlogin").live('click',function(){ var updVals = $(this).attr('id'); updVals = updVals.split('-'); var action = updVals[0]; var status = updVals[1]; var statusID = updVals[2]; var reg_action = action; var reg_status = status; var reg_id = statusID; if(action == 'privacy') { var reg_profile = $('input[id=mp_profile]:checked').attr("value"); var reg_bdate = $('input[id=mp_bdate]:checked').attr("value"); var reg_highlights = $('input[id=mp_highlights]:checked').attr("value"); var reg_likes = $('input[id=mp_likes]:checked').attr("value"); var reg_secure = $('input[id=mp_secure]:checked').attr("value"); if(reg_secure === undefined) var reg_secure = '1'; var dataString = 'reg_action='+ reg_action + '®_status=' + reg_status + '®_profile=' + reg_profile + '®_bdate=' + reg_bdate + '®_highlights=' + reg_highlights + '®_likes=' + reg_likes + '®_secure=' + reg_secure + '®_id=' + reg_id; $.ajax({ type: "POST", url: "/include/process/sp.acc.privacy.upd.inc.php", data: dataString, success: function (data) { if(data == 1) { $("#s_panel").load("/members/inc.s.account.php", {}, function(){ $('.open#'+action).trigger('click'); $('.s_succ').show(); }); } if(data == 2) { } }, error : function(data) { } }); } if(action == 'notification') { /* mnl_id mnl_siteid mnl_memberid mnl_artists artists mnl_brands brands mnl_edu education mnl_music music mnl_media new video & image albums mnl_events events mnl_contests contests mnl_promo promotions mnl_members member likes mnl_main website & legal updates mnl_date mnl_lastdate */ var reg_artists = $('input[id=mnl_artists]:checked').attr("value"); var reg_brands = $('input[id=mnl_brands]:checked').attr("value"); var reg_edu = $('input[id=mnl_edu]:checked').attr("value"); var reg_music = $('input[id=mnl_music]:checked').attr("value"); var reg_media = $('input[id=mnl_media]:checked').attr("value"); var reg_events = $('input[id=mnl_events]:checked').attr("value"); var reg_contests = $('input[id=mnl_contests]:checked').attr("value"); var reg_promo = $('input[id=mnl_promo]:checked').attr("value"); var reg_members = $('input[id=mnl_members]:checked').attr("value"); var reg_main = $('input[id=mnl_main]:checked').attr("value"); var dataString = 'reg_action='+ reg_action + '®_status=' + reg_status + '®_artists='+ reg_artists + '®_brands=' + reg_brands + '®_edu=' + reg_edu + '®_music=' + reg_music + '®_media=' + reg_media + '®_events=' + reg_events + '®_contests=' + reg_contests + '®_promo=' + reg_promo + '®_members=' + reg_members + '®_main=' + reg_main + '®_id=' + reg_id; $.ajax({ type: "POST", url: "/include/process/sp.acc.mnl.upd.inc.php", data: dataString, success: function (data) { if(data == 1) { $("#s_panel").load("/members/inc.s.account.php", {}, function(){ $('.open#'+action).trigger('click'); $('.s_succ').show(); }); } if(data == 2) { } }, error : function(data) { } }); } if(action == 'account') { var reg_account = $('input[id=mp_account]:checked').attr("value"); var dataString = 'reg_account='+ reg_account; } }); $("#s_opt_pass").live('click',function(){ $('.s_opt_pwd').show(); }); $("#unpas_c").live('click',function(){ hide_s_opt_pwd(); }); $("#unpas_s").live('click',function(){ var hasError = hasError; $('.unpas').remove(); var reg_password = $("#reg_password").val(); var reg_password1 = $("#reg_password1").val(); var reg_password2 = $("#reg_password2").val(); if($("#reg_password").val() == '') { hasError = true; $("#reg_password").after('
Enter your current password
'); } var passwordsVal = $("#reg_password1, #reg_password2").val(); if(passwordsVal == '') { hasError = true; $("#reg_password1, #reg_password2").after('
Enter your password
'); } else if ($("#reg_password1").val() != $("#reg_password2").val()) { hasError = true; $("#reg_password1, #reg_password2").after('
Your passwords do not match
'); } password1_length = reg_password1.length; if(reg_password1 != '' && password1_length < 6) { hasError = true; $("#reg_password1").after('

A password has a minimum of 6 characters
'); } if (hasError == undefined) { var dataString = 'reg_password='+ reg_password + '®_password1=' + reg_password1; $.ajax({ type: "POST", url: "/include/process/sp.acc.pwd.upd.inc.php", data: dataString, success: function(data){ if(data == 1) { $("#s_panel").load("/members/inc.s.account.php", {}, function(){ $('.s_succ').show(); $('.open#'+action).trigger('click'); }); } if(data == 2) { } if(data == 3) { } }, error : function(data) { } }); } }); $('input[id=mp_account]:checked').live('click',function() { var acc_val = $(this).attr('value'); if(acc_val == 1) { $(".s_opt_suspend").slideDown("slow"); $(".s_opt_delete").slideUp("slow"); $(".s_opt_delete_mail").hide(); $('#reg_del').attr('checked', false); $('input[id=reg_susp]:checked').live('click',function() { $(".s_opt_susp_pass").slideDown("slow"); }); } if(acc_val == 2) { $(".s_opt_suspend").slideUp("slow"); $(".s_opt_delete").slideDown("slow"); $(".s_opt_susp_pass").hide(); $('#reg_susp').attr('checked', false); $('input[id=reg_del]:checked').live('click',function() { $(".s_opt_delete_mail").slideDown("slow"); }); } }); $("#s_opt_suspend").live('click',function(){ $(".unpas, .s_opt_susp_err").hide(); if (!$("#reg_susp").is(":checked")) { $("#reg_susp").after('

Confirm your choice.
'); } else { var hasError = hasError; var reg_password = $('#reg_pwdsusp').val(); if(reg_password == '') { hasError = true; $(".s_opt_delete_mail").after('
Enter your current password
'); } var reg_suspend = $("#reg_susp").val(); var dataString = 'reg_suspend='+ reg_suspend + '®_password=' + reg_password; $.ajax({ type: "POST", url: "/include/process/sp.acc.susp.inc.php", data: dataString, success: function(data){ if(data == 1) { window.location = "?logout=1&status=suspend"; } if(data == 2) { $(".s_opt_susp_err").show('slow'); } }, error : function(data) { } }); } }); $("#s_opt_delete").live('click',function(){ $(".unpas").hide(); if (!$("#reg_del").is(":checked")) { $("#reg_del").after('

Confirm your choice.
'); } else { var hasError = hasError; var reg_password = $('#reg_pwdConf').val(); if(reg_password == '') { hasError = true; $(".s_opt_delete_mail").after('
Enter your current password
'); } var reg_delete = $("#reg_del").val(); var dataString = 'reg_delete='+ reg_delete + '®_password=' + reg_password; $.ajax({ type: "POST", url: "/include/process/sp.acc.del.inc.php", data: dataString, success: function(data){ if(data == 1) { window.location = "?logout=1&status=delete"; } if(data == 2) { $(".s_opt_delete_err").show('slow'); } if(data == 3) { $(".s_opt_delete_err").show('slow');} }, error : function(data) { } }); } }); } /* VIDEOS HOME */ $(".vhome_block, .viditem").live('click',function(){ var channelVar = $(this).attr('id'); /* alert(channelVar); */ }); $('.svc_main_more').mouseover(function() { $('.svc_main_more').effect("bounce", { times:3 }, 300); }); $('.svc_main_more').click(function() { $('.svc_main_sec').slideDown('slow', function() { $('.svc_main_more').hide('slow'); }); }); var timer = setTimeout(function() { $(".svc_main_more").click(); }, 15000); $(".svc_main_more").click(function(){ clearTimeout(timer); $('.svc_main_sec').slideDown('slow'); }); jQuery(function($){ 'use strict'; // ------------------------------------------------------------- // Basic Navigation // ------------------------------------------------------------- (function () { var $frame = $('#basic'); var $slidee = $frame.children('ul').eq(0); var $wrap = $frame.parent(); // Call Sly on frame $frame.sly({ horizontal: 1, itemNav: 'basic', smart: 1, activateOn: 'click', mouseDragging: 1, touchDragging: 1, releaseSwing: 1, startAt: 0, scrollBar: $wrap.find('.scrollbar'), scrollBy: 1, pagesBar: $wrap.find('.pages'), activatePageOn: 'click', speed: 300, elasticBounds: 1, easing: 'easeOutExpo', dragHandle: 1, dynamicHandle: 1, clickBar: 1, // Buttons forward: $wrap.find('.forward'), backward: $wrap.find('.backward'), prev: $wrap.find('.prev'), next: $wrap.find('.next'), prevPage: $wrap.find('.prevPage'), nextPage: $wrap.find('.nextPage') }); // To Start button $wrap.find('.toStart').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the start of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toStart', item); }); // To Center button $wrap.find('.toCenter').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the center of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toCenter', item); }); // To End button $wrap.find('.toEnd').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the end of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toEnd', item); }); // Add item $wrap.find('.add').on('click', function () { $frame.sly('add', '
  • ' + $slidee.children().length + '
  • '); }); // Remove item $wrap.find('.remove').on('click', function () { $frame.sly('remove', -1); }); }()); (function () { var $frame = $('#basic_os'); var $slidee = $frame.children('ul').eq(0); var $wrap = $frame.parent(); // Call Sly on frame $frame.sly({ horizontal: 1, itemNav: 'basic', smart: 1, activateOn: 'click', mouseDragging: 1, touchDragging: 1, releaseSwing: 1, startAt: 0, scrollBar: $wrap.find('.scrollbar'), scrollBy: 1, pagesBar: $wrap.find('.pages'), activatePageOn: 'click', speed: 300, elasticBounds: 1, easing: 'easeOutExpo', dragHandle: 1, dynamicHandle: 1, clickBar: 1, // Buttons forward: $wrap.find('.forward'), backward: $wrap.find('.backward'), prev: $wrap.find('.prev'), next: $wrap.find('.next'), prevPage: $wrap.find('.prevPage'), nextPage: $wrap.find('.nextPage') }); // To Start button $wrap.find('.toStart').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the start of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toStart', item); }); // To Center button $wrap.find('.toCenter').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the center of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toCenter', item); }); // To End button $wrap.find('.toEnd').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the end of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toEnd', item); }); // Add item $wrap.find('.add').on('click', function () { $frame.sly('add', '
  • ' + $slidee.children().length + '
  • '); }); // Remove item $wrap.find('.remove').on('click', function () { $frame.sly('remove', -1); }); }()); (function () { var $frame = $('#basic_br'); var $slidee = $frame.children('ul').eq(0); var $wrap = $frame.parent(); // Call Sly on frame $frame.sly({ horizontal: 1, itemNav: 'basic', smart: 1, activateOn: 'click', mouseDragging: 1, touchDragging: 1, releaseSwing: 1, startAt: 0, scrollBar: $wrap.find('.scrollbar'), scrollBy: 1, pagesBar: $wrap.find('.pages'), activatePageOn: 'click', speed: 300, elasticBounds: 1, easing: 'easeOutExpo', dragHandle: 1, dynamicHandle: 1, clickBar: 1, // Buttons forward: $wrap.find('.forward'), backward: $wrap.find('.backward'), prev: $wrap.find('.prev'), next: $wrap.find('.next'), prevPage: $wrap.find('.prevPage'), nextPage: $wrap.find('.nextPage') }); // To Start button $wrap.find('.toStart').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the start of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toStart', item); }); // To Center button $wrap.find('.toCenter').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the center of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toCenter', item); }); // To End button $wrap.find('.toEnd').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the end of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toEnd', item); }); // Add item $wrap.find('.add').on('click', function () { $frame.sly('add', '
  • ' + $slidee.children().length + '
  • '); }); // Remove item $wrap.find('.remove').on('click', function () { $frame.sly('remove', -1); }); }()); (function () { var $frame = $('#basic_dz'); var $slidee = $frame.children('ul').eq(0); var $wrap = $frame.parent(); // Call Sly on frame $frame.sly({ horizontal: 1, itemNav: 'basic', smart: 1, activateOn: 'click', mouseDragging: 1, touchDragging: 1, releaseSwing: 1, startAt: 0, scrollBar: $wrap.find('.scrollbar'), scrollBy: 1, pagesBar: $wrap.find('.pages'), activatePageOn: 'click', speed: 300, elasticBounds: 1, easing: 'easeOutExpo', dragHandle: 1, dynamicHandle: 1, clickBar: 1, // Buttons forward: $wrap.find('.forward'), backward: $wrap.find('.backward'), prev: $wrap.find('.prev'), next: $wrap.find('.next'), prevPage: $wrap.find('.prevPage'), nextPage: $wrap.find('.nextPage') }); // To Start button $wrap.find('.toStart').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the start of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toStart', item); }); // To Center button $wrap.find('.toCenter').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the center of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toCenter', item); }); // To End button $wrap.find('.toEnd').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the end of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toEnd', item); }); // Add item $wrap.find('.add').on('click', function () { $frame.sly('add', '
  • ' + $slidee.children().length + '
  • '); }); // Remove item $wrap.find('.remove').on('click', function () { $frame.sly('remove', -1); }); }()); if(("[id^=basic-]").lenght) { var num = this.id.slice(6); } var conveniancecount = $("[id^=basic-]").length; $( document ).ready(function() { var $frame = $("[id^=basic-]").load(); var num = $frame.slice(6); var $slidee = $frame.children('ul').eq(0); var $wrap = $frame.parent(); $("[id^=basic-]").each(function() { var num = this.id.slice(6); $frame = $("#basic-"+num); var frame = $("#basic-"+num); //alert(num); var $slidee = $frame.children('ul').eq(0); var $wrap = $frame.parent(); // Call Sly on frame $frame.sly({ horizontal: 1, itemNav: 'basic', smart: 1, activateOn: 'click', mouseDragging: 1, touchDragging: 1, releaseSwing: 1, startAt: 0, scrollBar: $wrap.find('.scrollbar'), scrollBy: 1, pagesBar: $wrap.find('.pages'), activatePageOn: 'click', speed: 300, elasticBounds: 1, easing: 'easeOutExpo', dragHandle: 1, dynamicHandle: 1, clickBar: 1, // Buttons forward: $wrap.find('.forward'), backward: $wrap.find('.backward'), prev: $wrap.find('.prev'), next: $wrap.find('.next'), prevPage: $wrap.find('.prevPage'), nextPage: $wrap.find('.nextPage') }); // To Start button $wrap.find('.toStart').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the start of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toStart', item); }); // To Center button $wrap.find('.toCenter').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the center of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toCenter', item); }); // To End button $wrap.find('.toEnd').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the end of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toEnd', item); }); // Add item $wrap.find('.add').on('click', function () { $frame.sly('add', '
  • ' + $slidee.children().length + '
  • '); }); // Remove item $wrap.find('.remove').on('click', function () { $frame.sly('remove', -1); }); }); }()); // ------------------------------------------------------------- // Centered Navigation // ------------------------------------------------------------- (function () { var $frame = $('#centered'); var $wrap = $frame.parent(); // Call Sly on frame $frame.sly({ horizontal: 1, itemNav: 'centered', smart: 1, activateOn: 'click', mouseDragging: 1, touchDragging: 1, releaseSwing: 1, startAt: 4, scrollBar: $wrap.find('.scrollbar'), scrollBy: 1, speed: 300, elasticBounds: 1, easing: 'easeOutExpo', dragHandle: 1, dynamicHandle: 1, clickBar: 1, // Buttons prev: $wrap.find('.prev'), next: $wrap.find('.next') }); }()); // ------------------------------------------------------------- // Force Centered Navigation // ------------------------------------------------------------- (function () { var $frame = $('#forcecentered'); var $wrap = $frame.parent(); // Call Sly on frame $frame.sly({ horizontal: 1, itemNav: 'forceCentered', smart: 1, activateMiddle: 1, activateOn: 'click', mouseDragging: 1, touchDragging: 1, releaseSwing: 1, startAt: 0, scrollBar: $wrap.find('.scrollbar'), scrollBy: 1, speed: 300, elasticBounds: 1, easing: 'easeOutExpo', dragHandle: 1, dynamicHandle: 1, clickBar: 1, // Buttons prev: $wrap.find('.prev'), next: $wrap.find('.next') }); }()); // ------------------------------------------------------------- // Cycle By Items // ------------------------------------------------------------- (function () { var $frame = $('#cycleitems'); var $wrap = $frame.parent(); // Call Sly on frame $frame.sly({ horizontal: 1, itemNav: 'basic', smart: 1, activateOn: 'click', mouseDragging: 1, touchDragging: 1, releaseSwing: 1, startAt: 0, scrollBar: $wrap.find('.scrollbar'), scrollBy: 1, speed: 300, elasticBounds: 1, easing: 'easeOutExpo', dragHandle: 1, dynamicHandle: 1, clickBar: 1, // Cycling cycleBy: 'items', cycleInterval: 1000, pauseOnHover: 1, // Buttons prev: $wrap.find('.prev'), next: $wrap.find('.next') }); // Pause button $wrap.find('.pause').on('click', function () { $frame.sly('pause'); }); // Resume button $wrap.find('.resume').on('click', function () { $frame.sly('resume'); }); // Toggle button $wrap.find('.toggle').on('click', function () { $frame.sly('toggle'); }); }()); // ------------------------------------------------------------- // Cycle By Pages // ------------------------------------------------------------- (function () { var $frame = $('#cyclepages'); var $wrap = $frame.parent(); // Call Sly on frame $frame.sly({ horizontal: 1, itemNav: 'basic', smart: 1, activateOn: 'click', mouseDragging: 1, touchDragging: 1, releaseSwing: 1, startAt: 0, scrollBar: $wrap.find('.scrollbar'), scrollBy: 1, pagesBar: $wrap.find('.pages'), activatePageOn: 'click', speed: 300, elasticBounds: 1, easing: 'easeOutExpo', dragHandle: 1, dynamicHandle: 1, clickBar: 1, // Cycling cycleBy: 'pages', cycleInterval: 1000, pauseOnHover: 1, startPaused: 1, // Buttons prevPage: $wrap.find('.prevPage'), nextPage: $wrap.find('.nextPage') }); // Pause button $wrap.find('.pause').on('click', function () { $frame.sly('pause'); }); // Resume button $wrap.find('.resume').on('click', function () { $frame.sly('resume'); }); // Toggle button $wrap.find('.toggle').on('click', function () { $frame.sly('toggle'); }); }()); // ------------------------------------------------------------- // One Item Per Frame // ------------------------------------------------------------- (function () { var $frame = $('#oneperframe'); var $wrap = $frame.parent(); // Call Sly on frame $frame.sly({ horizontal: 1, itemNav: 'forceCentered', smart: 1, activateMiddle: 1, mouseDragging: 1, touchDragging: 1, releaseSwing: 1, startAt: 0, scrollBar: $wrap.find('.scrollbar'), scrollBy: 1, speed: 300, elasticBounds: 1, easing: 'easeOutExpo', dragHandle: 1, dynamicHandle: 1, clickBar: 1, // Buttons prev: $wrap.find('.prev'), next: $wrap.find('.next') }); }()); // ------------------------------------------------------------- // Crazy // ------------------------------------------------------------- (function () { var $frame = $('#crazy'); var $slidee = $frame.children('ul').eq(0); var $wrap = $frame.parent(); // Call Sly on frame $frame.sly({ horizontal: 1, itemNav: 'basic', smart: 1, activateOn: 'click', mouseDragging: 1, touchDragging: 1, releaseSwing: 1, startAt: 1, scrollBar: $wrap.find('.scrollbar'), scrollBy: 1, pagesBar: $wrap.find('.pages'), activatePageOn: 'click', speed: 300, elasticBounds: 1, easing: 'easeOutExpo', dragHandle: 1, dynamicHandle: 1, clickBar: 1, // Buttons forward: $wrap.find('.forward'), backward: $wrap.find('.backward'), prev: $wrap.find('.prev'), next: $wrap.find('.next'), prevPage: $wrap.find('.prevPage'), nextPage: $wrap.find('.nextPage') }); // To Start button $wrap.find('.toStart').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the start of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toStart', item); }); // To Center button $wrap.find('.toCenter').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the center of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toCenter', item); }); // To End button $wrap.find('.toEnd').on('click', function () { var item = $(this).data('item'); // Animate a particular item to the end of the frame. // If no item is provided, the whole content will be animated. $frame.sly('toEnd', item); }); // Add item $wrap.find('.add').on('click', function () { $frame.sly('add', '
  • ' + $slidee.children().length + '
  • '); }); // Remove item $wrap.find('.remove').on('click', function () { $frame.sly('remove', -1); }); }()); }); /* VIDEO CHANNELS */ /***** use for showing channels in pannels + update right video navigation **** $("#s_panel").load("/members/inc.s.likes.main.php", {}, function(){ $("#l_panel").load("/members/inc.s.likes.artists.php"); }); */ /* store likes, dislikes etc */ $('#vid_acts li').click(function() { var vidData = $(this).attr('data-name'); var dataString = 'vidData='+ vidData; vidSect = vidData.split('-'); var like_action = vidSect[0]; var like_channel_type = vidSect[1]; var like_artist_id = vidSect[2]; var like_book_id = vidSect[3]; var like_video_id = vidSect[4]; var like_XXXXX = vidSect[5]; $.ajax({ type: "POST", url: "/include/process/like_media.php", data: dataString, success: function(data){ dataVars = data.split('-'); var dv_action = dataVars[0]; var dv_views = dataVars[1]; var dv_likes = dataVars[2]; var dv_dislikes = dataVars[3]; if(dv_action == "11") { $("#vid_act-11").attr('class', 'hidden'); $("#vid_act-10").attr('class', 'blue'); $(".vp_sub").html(dv_views + ' views | ' + dv_likes + ' | 👎 ' + dv_dislikes ); } if(dv_action == "10") { $("#vid_act-10").attr('class', 'hidden'); $("#vid_act-11").attr('class', ''); $(".vp_sub").html(dv_views + ' views | ' + dv_likes + ' | 👎 ' + dv_dislikes ); } if(dv_action == "21") { $("#vid_act-21").attr('class', 'hidden'); $("#vid_act-20").attr('class', 'blue'); } if(dv_action == "20") { $("#vid_act-20").attr('class', 'hidden'); $("#vid_act-21").attr('class', ''); } if(dv_action == "31") { $("#vid_act-31").attr('class', 'hidden'); $("#vid_act-30").attr('class', 'blue'); $(".vp_sub").html(dv_views + ' views | ' + dv_likes + ' | 👎 ' + dv_dislikes ); } if(dv_action == "30") { $("#vid_act-30").attr('class', 'hidden'); $("#vid_act-31").attr('class', ''); $(".vp_sub").html(dv_views + ' views | ' + dv_likes + ' | 👎 ' + dv_dislikes ); } else { //alert('errorNEE'); } }, error : function(data) { //alert(data); } }); }); /* LIKE / UNLIKE ARTISTS & VIDEOS ==============================================*/ $(document).on( "click", ".likeArtist", function() { var string = $(this).attr('data'); string = string.split('-'); var artistID = string[0]; var device = string[1]; var dataString = 'likeid='+ artistID + '&act=' + device; if(device == "1") { $(this).toggleClass("likeArtist likedArtist_mob").attr("src","/img/icons/heart_liked.png"); } if(device == "2") { $(this).removeClass("likeArtist").addClass("likedArtist").attr("src","/img/icons/heart_liked.png"); } $.ajax({ type: "POST", url: "/include/process/artist_like.php", data: dataString, success: function(data){ //alert(data); $("#likesview-"+artistID).attr("class", "block set"); $("#likesview-"+artistID).show().html(data); }, error : function(data) { //alert('nope'); $(this).attr("src", "/img/icons/heart_active.png"); } }); }); $(document).on("click", ".likedArtist, .likedArtist_mob", function (){ var string = $(this).attr('data'); string = string.split('-'); var artistID = string[0]; var device = string[1]; var dataString = 'likeid='+ artistID + '&act=' + device; $(this).removeClass("likedArtist").addClass("likeArtist").attr("src","/img/icons/heart_active.png"); $.ajax({ type: "POST", url: "/include/process/artist_un_like.php", data: dataString, success: function(data){ //alert(data); $("#likesview-"+artistID).attr("class", "block set"); $("#likesview-"+artistID).html(data); }, error : function(data) { //alert('nope'); $(this).attr("src", "/img/icons/heart_active.png"); } }); }); /* unlike for mobile versions / jquery.mobile is loaded */ $(document).on('vclick', '.likedArtist_mob', function(ev){ ev.preventDefault(); /* does not fire twice! */ var string = $(this).attr('data'); string = string.split('-'); var artistID = string[0]; var device = string[1]; var dataString = 'likeid='+ artistID + '&act=' + device; if(device == "1") { $(this).toggleClass("likedArtist_mob likeArtist").attr("src","/img/icons/heart_active.png"); } if(device == "2") { $(this).removeClass("likedArtist").addClass("likeArtist").attr("src","/img/icons/heart_active.png"); } $.ajax({ type: "POST", url: "/include/process/artist_un_like.php", data: dataString, success: function(data){ //alert(data); $(this).attr("src", "/img/icons/heart_active.png"); $("#likesview-"+artistID).attr("class", "block set"); $("#likesview-"+artistID).html(data); }, error : function(data) { //alert('nope'); $(this).attr("src", "/img/icons/heart_active.png"); } }); }); /* ### VIDEOS */ $(document).on( "click", ".likeVid", function() { var string = $(this).attr('data'); string = string.split('-'); var mainID = string[0]; var device = string[1]; var dataString = 'likeid='+ mainID + '&act=' + device; if(device == "1") { $(this).toggleClass("likeVid likedVid_mob").attr("src","/img/icons/heart_liked.png"); } if(device == "2") { $(this).removeClass("likeVid").addClass("likedVid").attr("src","/img/icons/heart_liked.png"); } $.ajax({ type: "POST", url: "/include/process/media_like.php", data: dataString, success: function(data){ //alert(data); $("#likesview-"+mainID).attr("class", "block set"); $("#likesview-"+mainID).show().html(data); }, error : function(data) { // alert('nope'); $(this).attr("src", "/img/icons/heart_active.png"); } }); }); $(document).on("dblclick", ".likedVid", function (){ var string = $(this).attr('data'); string = string.split('-'); var mainID = string[0]; var device = string[1]; var dataString = 'likeid='+ mainID + '&act=' + device; $(this).removeClass("likedVid").addClass("likeVid").attr("src","/img/icons/heart_active.png"); $.ajax({ type: "POST", url: "/include/process/media_un_like.php", data: dataString, success: function(data){ //alert(data); $("#likesview-"+mainID).attr("class", "block set"); $("#likesview-"+mainID).html(data); }, error : function(data) { //alert('nope dblClick'); $(this).attr("src", "/img/icons/heart_liked.png"); } }); }); /* unlike for mobile versions / jquery.mobile is loaded */ $(document).on('vclick', '.likedVid_mob', function(ev){ ev.preventDefault(); /* does not fire twice! */ var string = $(this).attr('data'); string = string.split('-'); var mainID = string[0]; var device = string[1]; var dataString = 'likeid='+ mainID + '&act=' + device; if(device == "1") { $(this).toggleClass("likedVid_mob likeVid").attr("src","/img/icons/heart_active.png"); } if(device == "2") { $(this).removeClass("likedVid").addClass("likeVid").attr("src","/img/icons/heart_active.png"); } $.ajax({ type: "POST", url: "/include/process/media_un_like.php", data: dataString, success: function(data){ //alert(data); $(this).attr("src", "/img/icons/heart_active.png"); $("#likesview-"+mainID).attr("class", "block set"); $("#likesview-"+mainID).html(data); }, error : function(data) { //alert('nope vClick'); $(this).attr("src", "/img/icons/heart_liked.png"); } }); }); /* END LIKE / UNLIKE ARTISTS & VIDEOS ==============================================*/ /* # LIVE SEARCH ALL ================================================== */ $('#search').each(function(){ $(this).val( $(this).attr('rel') ); }); $('#search').focus( function(){ if( $(this).val() == $(this).attr('rel') ){ $(this).val('').addClass('not-empty'); } $('.clearimg img'). show(); }); $('#search').blur(function(){ $('#ajaxLoader').hide(); if( $(this).val() =='' ){ $(this).val( $(this).attr('rel') ).removeClass('not-empty'); } }); /* DO NAME SEARCH */ var $input = $('#search'), $output = $('#charCount'), re_strip = /\{.*?\}/g; $input.keyup(function () { var val = $(this).val(); var valCount = $('#search').val().replace(/ /g,'').length; if(valCount == "4") { $(".search_output").after(''); } if(valCount >= "4") { var searchType = $('#search').attr('data'); if(searchType === "brands") { var searchFile = '/search/searchbrands.php'; } else if(searchType === "video") { var searchFile = '/search/searchvideos.php'; } else { var searchFile = '/include/process/search.artists.listing.php'; } $('.search_value').val($(this).val()); var dataString = 'search_value='+ val + '&search_type=' + 'live'; /*alert(searchType + ' ' + dataString + ' ' + searchFile);*/ $.ajax({ type: "POST", url: searchFile, data: dataString, success: function(data){ //alert(data); $('.content_output').hide(); $('#ajaxLoader').hide(); $('.search_output').html(data); $(".search_output").after(''); $('.vidresscroll').hide('slow'); }, error : function(data) { //alert('nope'); if(data == "2") { } } }); } if(valCount < "4") { $('.search_output').html(); } }); $(".clearimg").click(function(){ $('.content_output').show(); $('.search_output').html(''); $('#search').val( $('#search').attr('rel') ); }); /* DO SCROLL SEARCH */ /* $(document).ready(function(){ function last_msg_funtion() { $('.notfound, #ajaxLoader').hide(); // $(".message_box:last").after(''); var getRows=$(".message_box:last").attr("id"); getRows = getRows.split('-'); var ID = getRows[0]; var search_entr = getRows[1]; var dataString = 'search_nr='+ ID + '&search_value=' + search_entr; $.ajax({ type: "POST", url: '/include/process/search.artists.listingXXX.php', data: dataString, success: function(data){ //alert(data); if (data != "") { $(".message_box:last").after(data); $('#ajaxLoader').hide(); } }, error : function(data) { //alert('nope'); if(data == "2") { } } }); }; $(window).scroll(function(){ if ($(window).scrollTop() == $(document).height() - $(window).height()){ last_msg_funtion(); } }); }); */ $("#passsearch").live('click',function(){ var search_data = $('#search').val(); $('form#vidzsrch').trigger('submit'); }); var $vsDiv = $('.vidresscroll'); if($vsDiv.length) { $("#lmore").live('click',function(){ $(this).hide(); $('#ajaxLoader').hide(); function last_msg_funtion() { $('.notfound, #ajaxLoader').hide(); $(".message_box:last").after(''); var getRows=$(".message_box:last").attr("id"); getRows = getRows.split('-'); var ID = getRows[0]; var search_entr = getRows[1]; if(ID === "no") { $(".message_box:last").after('Snap! No more videos, but we hope you enjoyed them!'); $('#ajaxLoader').hide(); } if(ID != "no") { var dataString = 'search_nr='+ ID + '&search_value=' + search_entr; $.ajax({ type: "POST", url: '/search/searchvideos.php', data: dataString, success: function(data){ //alert(data); if (data != "") { $(".message_box:last").after(data); $('#ajaxLoader').hide(); } }, error : function(data) { //alert('nope'); if(data == "2") { } } }); } }; last_msg_funtion(); }); /* $(window).scroll(function() { var top_of_element = $(".footer").offset().top; var bottom_of_element = $(".footer").offset().top + $(".footer").outerHeight(); var bottom_of_screen = $(window).scrollTop() + $(window).innerHeight(); var top_of_screen = $(window).scrollTop(); if ((bottom_of_screen > top_of_element) && (top_of_screen < bottom_of_element)){ last_msg_funtion(); } else { } }); */ /* function last_msg_funtion() { $('.notfound, #ajaxLoader').hide(); $(".message_box:last").after(''); var getRows=$(".message_box:last").attr("id"); getRows = getRows.split('-'); var ID = getRows[0]; var search_entr = getRows[1]; if(ID === "no") { $(".message_box:last").after('Snap! No more videos, but we hope you enjoyed them!'); $('#ajaxLoader').hide(); } if(ID != "no") { var dataString = 'search_nr='+ ID + '&search_value=' + search_entr; $.ajax({ type: "POST", url: '/search/searchvideos.php', data: dataString, success: function(data){ //alert(data); if (data != "") { $(".message_box:last").after(data); $('#ajaxLoader').hide(); } }, error : function(data) { //alert('nope'); if(data == "2") { } } }); } }; $(window).scroll(function(){ if ($(window).scrollTop() == $(document).height() - $(window).height()){ } }); $(window).scroll(function() { var top_of_element = $(".footer").offset().top; var bottom_of_element = $(".footer").offset().top + $(".footer").outerHeight(); var bottom_of_screen = $(window).scrollTop() + $(window).innerHeight(); var top_of_screen = $(window).scrollTop(); if ((bottom_of_screen > top_of_element) && (top_of_screen < bottom_of_element)){ last_msg_funtion(); } else { } }); */ } /* LIVE SEARCH $("input.searchnav").click(function(){ var searchtxt = $(this).val(); $('input.searchnav').val(''); $('.searchtip').show('slow'); }); $("input.searchnav").focusout(function() { $(this).val(searchtxt); }); $('input.searchnav').each(function() { var searchtxt = $(".searchnav").val(); $(this).css("color","#CCC"); var default_value = this.value; $(this).focus(function() { $(this).css("color","#0080BC"); if(this.value == default_value) { this.value = ''; } $('.searchtip').fadeIn('slow'); }); $('html').not(this).click(function() { if(this.value == '') { this.value = default_value; } $(this).css("color","#CCC"); $('.searchtip').fadeOut('slow'); }); }); $("#searchfld").click(function() { $('input.searchnav').val(''); $(this).css("color","#0080BC"); $('.searchtip').fadeIn('slow'); }); $('input.searchnav').on('mouseleave', function() { if($('input.searchnav').is(":focus")) { } }); $("#searchfld").click(function() { $(this).attr('clicked', 'yes'); $("#searchfld").val(''); $('.searchnav').focus(); }); */ $('input.searchnav').keypress(function (e) { var formName = $(this).attr('id'); if (e.which == 13) { if (formName == "searchNws") { $('form#s_news').submit(); } if (formName == "searchArtists") { $('form#s_artists').submit(); } if (formName == "searchMembers") { $('form#s_members').submit(); } if (formName == "searchVid") { $('form#s_vid').submit(); } if (formName == "searchMusic") { $('form#s_music').submit(); } } }); $("input.searchnav").click(function(){ var searchtxt = $(this).val(); $('input.searchnav').val(''); $('.searchtip').show('slow'); }); $("input.searchnav").focusout(function() { $(this).val(searchtxt); }); $(".searchbrand").live('keyup',function(){ var searchbox = $(this).val(); var dataString = 'searchword='+ searchbox; if(searchbox=='') {} else { $.ajax({ type: "POST", url: "/search/searchbrands.php", data: dataString, cache: false, success: function(html) { $("#display, #display_usr").html(html).show(); } }); } return false; }); $('html').click(function() { $('.display_box').hide(); $('.searchbrand').val(''); }); $(".searchbrand_usr").live('keyup',function(){ $('.searchbrand_usr').css("color","#333"); var searchbox = $(this).val(); var searchbox_length = $(".searchbrand_usr").val().length; var dataString = 'searchword='+ searchbox; if(searchbox=='') {} if(searchbox_length > 3) { $('.srl_loader').show(); $.ajax({ type: "POST", url: "/search/searchbrands_live.php", data: dataString, cache: false, success: function(html) { $('#srl_success, .srl_loader').hide(); $("#display_usr").html(html).show(); } }); } return false; }); $(".srl_addBrand").live('click',function(){ $(this).tooltip().hide(); var brandID = $(this).attr('id'); var dataString = 'brandID='+ brandID; $.ajax({ type: "POST", url: "/include/process/like_brands_live.php", data: dataString, success: function(data){ if(data == 1) { $("#s_panel").load("/members/inc.s.gear.php", {}, function(){ $("#srl_success").show().html("Your brand has been added to your gear list. You can set the gear status of your brands below."); $('.srl_r img[title]').tooltip().hide(); }); } if(data == 2) { } }, error : function(data) { } }); }); $('html').live('click', function() { $('#display_usr').slideUp(); $('.searchbrand_usr').val(''); }); $(".searchartists_usr").live('keyup',function(e){ $(this).css('color', '#333'); var searchbox = $(this).val(); var searchbox_length = $(".searchartists_usr").val().length; var dataString = 'searchword='+ searchbox; if(searchbox=='') {} if(searchbox_length > 3) { $('.srl_loader').show(); $.ajax({ type: "POST", url: "/search/search.artists_live.php", data: dataString, cache: false, success: function(html) { $('#srl_success, .srl_loader').hide(); $("#display_usr").html(html).show(); }, error : function(html) { $("#srl_success").show().html("Nope."); } }); } return false; }); $(".srl_addArtist").live('click',function(){ $(this).tooltip().hide(); var brandID = $(this).attr('id'); var dataString = 'brandID='+ brandID; $.ajax({ type: "POST", url: "/include/process/like_artists_live.php", data: dataString, success: function(data){ if(data == 1) { $("#s_panel").load("/members/inc.s.likes.main.php", {}, function(){ $("#l_panel").load("/members/inc.s.likes.artists.php", {}, function(){ $("#srl_success").show().html("The artist is added to your artist roster. You can rate and put him or her in your personal Artist Top 10."); $this.tooltip().hide(); }); }); } if(data == 2) { } }, error : function(data) { } }); }); $('html').live('click', function() { $('#display_usr').slideUp(); $('.searchartists_usr, .searchmusic_usr, .searchrel_usr, .searchmem_usr').val(''); }); /*music*/ $(".searchmusic_usr").live('keyup',function(e){ $(this).css('color', '#333'); var searchbox = $(this).val(); var searchbox_length = $(".searchmusic_usr").val().length; var dataString = 'searchword='+ searchbox; if(searchbox=='') {} if(searchbox_length > 3) { $('.srl_loader').show(); $.ajax({ type: "POST", url: "/search/search.music_live.php", data: dataString, cache: false, success: function(html) { $('#srl_success, .srl_loader').hide(); $("#display_usr").html(html).show(); }, error : function(html) { $("#srl_success").show().html("Nope."); } }); } return false; }); $(".srl_addMusic").live('click',function(){ $(this).tooltip().hide(); var brandID = $(this).attr('id'); var dataString = 'brandID='+ brandID; $.ajax({ type: "POST", url: "/include/process/like_music_live.php", data: dataString, success: function(data){ if(data == 1) { $("#s_panel").load("/members/inc.s.likes.main.php", {}, function(){ $("#l_panel").load("/members/inc.s.likes.music.php", {}, function(){ $("#srl_success").show().html("The musical group / artist / project is added to your music roster."); $this.tooltip().hide(); }); }); } if(data == 2) { } }, error : function(data) { } }); }); /*releases*/ $(".searchrel_usr").live('keyup',function(e){ $(this).css('color', '#333'); var searchbox = $(this).val(); var searchbox_length = $(".searchrel_usr").val().length; var dataString = 'searchword='+ searchbox; if(searchbox=='') {} if(searchbox_length > 3) { $('.srl_loader').show(); $.ajax({ type: "POST", url: "/search/search.releases_live.php", data: dataString, cache: false, success: function(html) { $('#srl_success, .srl_loader').hide(); $("#display_usr").html(html).show(); }, error : function(html) { $("#srl_success").show().html("The search could not be completed. Please try again."); $('#srl_success, .srl_loader').hide(); } }); } return false; }); $(".srl_addRel").live('click',function(){ $(this).tooltip().hide(); var brandID = $(this).attr('id'); var dataString = 'brandID='+ brandID; $.ajax({ type: "POST", url: "/include/process/like_releases_live.php", data: dataString, success: function(data){ if(data == 1) { $("#s_panel").load("/members/inc.s.likes.main.php", {}, function(){ $("#l_panel").load("/members/inc.s.likes.releases.php", {}, function(){ $("#srl_success").show().html("The release is added to your favorite list."); $this.tooltip().hide(); }); }); } if(data == 2) { } }, error : function(data) { } }); }); /*members*/ $(".searchmem_usr").live('keyup',function(e){ $(this).css('color', '#333'); var searchbox = $(this).val(); var searchbox_length = $(".searchmem_usr").val().length; var dataString = 'searchword='+ searchbox; if(searchbox=='') {} if(searchbox_length > 3) { $('.srl_loader').show(); $.ajax({ type: "POST", url: "/search/search.members_live.php", data: dataString, cache: false, success: function(html) { $('#srl_success, .srl_loader').hide(); $("#display_usr").html(html).show(); }, error : function(html) { $("#srl_success").show().html("The search could not be completed. Please try again."); $('#srl_success, .srl_loader').hide(); } }); } return false; }); $(".srl_addMem").live('click',function(){ $(this).tooltip().hide(); var brandID = $(this).attr('id'); var dataString = 'brandID='+ brandID; $.ajax({ type: "POST", url: "/include/process/like_member_live.php", data: dataString, success: function(data){ if(data == 1) { $("#s_panel").load("/members/inc.s.likes.friends.php", {}, function(){ $("#srl_success").show().html("This member is added to your favorite list and showing in your list below."); }); } if(data == 2) { //alert('nope'); } }, error : function(data) { //alert('nope2'); } }); }); /* FORMS */ $('#country').change( function(){ $(this).closest('form').trigger('submit'); /* or: $('#formElementId').trigger('submit'); or: $('#formElementId').submit(); */ }); $('.grid').isotope({ percentPosition: true, itemSelector: '.grid-itemi', masonry: { columnWidth: '.grid-sizer' } }) /* *** EDUCATION *** */ /* store in MEDIA_SESSIONS */ if($("#channelplayer").length > 0) { var getvidid = $('.edu_status').attr('data'); var action = 99; var dataString = 'call='+ action + '&mediaid=' + getvidid; $.ajax({ type: "POST", url: "/include/process/inc.videos.sessions.php", data: dataString, success: function(data){ if(data == "1-1") { //alert('yep: equal'); } if(data == "1-2") {} if(data == "1-2-3") { $(".contest_form").hide("slow"); $(".contest_succes").show("slow"); } }, error : function(data) { //alert('nope'); } }); } /* store MEDIA VIEWS - as above */ /* end store MEDIA VIEWS */ /* store EDUCATION ACTIONS */ $("#edu_act").live('click',function(){ var getaction = $(this).attr('data'); getaction = getaction.split('-'); var action = getaction[0]; var edu_bookID = getaction[1]; var edu_artistID = getaction[2]; var mediaNR = getaction[3]; var dataString = 'action='+ action + '&edu_bookID=' + edu_bookID + '&edu_artistID=' + edu_artistID + '&mediaNR=' + mediaNR; $.ajax({ type: "POST", url: "/include/process/edu_video_actions.php", data: dataString, success: function(data){ if(data == 1) { $("li[data='" + action + "-" + edu_bookID + "-" + edu_artistID + "-" + mediaNR + "']").css("background-color", "#0080BC"); } if(data == 2) { $("li[data='" + action + "-" + edu_bookID + "-" + edu_artistID + "-" + mediaNR + "']").css("background-color", "#0080BC").html(" finished"); } if(data == "2-2") { $("li[data='" + action + "-" + edu_bookID + "-" + edu_artistID + "-" + mediaNR + "']").css("background-color", "#333").html(" mark finished"); } if(data == 3) { $("li[data='" + action + "-" + edu_bookID + "-" + edu_artistID + "-" + mediaNR + "']").css("background-color", "#0080BC").html(" my favorite"); } if(data == "3-3") { $("li[data='" + action + "-" + edu_bookID + "-" + edu_artistID + "-" + mediaNR + "']").css("background-color", "#333").html(" ad to favorites"); } if(data == 4) { $("li[data='" + action + "-" + edu_bookID + "-" + edu_artistID + "-" + mediaNR + "']").css("background-color", "#0080BC").html(" saved"); } if(data == "4-4") { $("li[data='" + action + "-" + edu_bookID + "-" + edu_artistID + "-" + mediaNR + "']").css("background-color", "#333").html(" save for later"); } }, error : function(data) { } }); }); /* EMPTY EDUCATION ACTIONS */ $("#edu_act_del").live('click',function(){ var getaction = $(this).attr('data'); getaction = getaction.split('-'); var action = getaction[0]; var edu_bookID = getaction[1]; var edu_artistID = getaction[2]; var mediaNR = getaction[3]; var mediaAction = getaction[4]; var dataString = 'action='+ action + '&edu_bookID=' + edu_bookID + '&edu_artistID=' + edu_artistID + '&mediaNR=' + mediaNR + '&mediaAction=' + mediaAction; $.ajax({ type: "POST", url: "/include/process/edu_video_actions_delete.php", data: dataString, success: function(data){ if(data == 2) { $("li[data='" + action + "-" + edu_bookID + "-" + edu_artistID + "-" + mediaNR + "-" + mediaAction + "']").css("background-color", "#333").html(" mark finished"); } if(data == 3) { $("li[data='" + action + "-" + edu_bookID + "-" + edu_artistID + "-" + mediaNR + "-" + mediaAction + "']").css("background-color", "#333").html(" ad to favorites"); } if(data == 4) { $("li[data='" + action + "-" + edu_bookID + "-" + edu_artistID + "-" + mediaNR + "-" + mediaAction + "']").css("background-color", "#333").html(" save for later"); } }, error : function(data) { } }); }); /* CONTESTS */ $("#show_tandc").click(function() { $("#tandc").toggle(); }); $('input[name=reg_bdate]').focus(function() { if (!$(this).data("DefaultText")) $(this).data("DefaultText", $(this).val()); if ($(this).val() != "" && $(this).val() == $(this).data("DefaultText")) $(this).val(""); }).blur(function(){ if ($(this).val() == "") $(this).val($(this).data("DefaultText")); }); $(".c_line").click(function() { $(this).css({'background-color' : '#FFF'}); }); $('#reg_agree').change(function() { if($(this).is(":checked")) { $("#reg_agree").prev('div').remove(); } }); $('select[name=reg_cntry]').change(function() { $('select[name=reg_cntry]').css({'background-color' : '#FFF'}); if($('select[name=reg_cntry]').val() == '') $('select[name=reg_cntry]').css({'background-color' : 'yellow'}); }); $("#enterContest").click(function() { $("#reg_agree").prev('div').remove(); var hasError = hasError; var contestNo = $("#contestNo").val(); var answer = $('input[name=contestA]:checked', '#contest_form').attr('value') var firstname = $("#reg_fn").val(); var lastname = $("#reg_ln").val(); var reg_bdateDat = $("#reg_bdateDat").val(); var reg_bdateMonth = $("#reg_bdateMonth").val(); var reg_bdateYear = $("#reg_bdateYear").val(); var reg_email = $("#reg_email").val(); var reg_address = $("#reg_address").val(); var reg_city = $("#reg_city").val(); var reg_state = $("#reg_state").val(); var reg_zip = $("#reg_zip").val(); var reg_cntry = $('select[name=reg_cntry]').val(); var reg_phone = $("#reg_phone").val(); var agree = $('input[name=reg_agree]:checked', '#contest_form').attr('value') if(answer == undefined) { hasError = true; $("#answer_err").css({'background-color' : 'yellow'});} else $("#answer_err").css({'background-color' : '#FFF'}); if(firstname == '') { hasError = true; $("#reg_fn").css({'background-color' : 'yellow'});} if(lastname == '') { hasError = true; $("#reg_ln").css({'background-color' : 'yellow'});} if(reg_email == '') { hasError = true; $("#reg_email").css({'background-color' : 'yellow'});} if(reg_address == '' || reg_address == ' ') { hasError = true; $("#reg_address").css({'background-color' : 'yellow'});} if(reg_city == '') { hasError = true; $("#reg_city").css({'background-color' : 'yellow'});} if(reg_state == '') { hasError = true; $("#reg_state").css({'background-color' : 'yellow'});} if(reg_zip == '') { hasError = true; $("#reg_zip").css({'background-color' : 'yellow'});} if(reg_cntry == '') { hasError = true; $('select[name=reg_cntry]').css({'background-color' : 'yellow'});} if(reg_phone == '') { hasError = true; $("#reg_phone").css({'background-color' : 'yellow'});} if(agree == undefined) { hasError = true; $("#reg_agree").before('
    ');} var date = $('#reg_bdateYear').val() + '-' + $('#reg_bdateMonth').val() + '-' + $('#reg_bdateDat').val(); if(date.match(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) { $("#reg_bdateDat,#reg_bdateMonth, #reg_bdateYear").css({'background-color' : '#FFF'}); } else { $("#reg_bdateDat,#reg_bdateMonth, #reg_bdateYear").css({'background-color' : 'yellow'}); } var dataString = 'answer='+ answer + '&contestNo=' + contestNo + '&firstname=' + firstname + '&lastname=' + lastname + '®_email=' + reg_email + '®_address=' + reg_address + '®_city=' + reg_city + '®_state=' + reg_state + '®_zip=' + reg_zip + '®_cntry=' + reg_cntry + '®_bdateDat=' + reg_bdateDat + '®_bdateMonth=' + reg_bdateMonth + '®_bdateYear=' + reg_bdateYear + '®_phone=' + reg_phone; if (hasError == undefined) { $.ajax({ type: "POST", url: "/include/process/contest_submit.php", data: dataString, success: function(data){ if(data == "1-1") { //alert('yep: equal'); } if(data == "1-2") {} if(data == "1-2-3") { $(".contest_form, #tandc").hide("slow"); $(".contest_succes").show("slow"); } }, error : function(data) { $(".contest_error").show("slow"); } }); } }); $("#map-canvas").click(function() { var currMarker = $(document).data('currMarker'); if(currMarker) console.log(currMarker); /*alert('goed:' + currMarker);*/ $.ajax({ type: "POST", url: "/include/process/gmaps_brands.php", data: "currMarker="+currMarker, success: function(data){ $(".logobox"+currMarker).html(data); }, error : function(data) { $(".logobox"+currMarker).html('Unable to load brands.'); //alert('Unable to load brands.'); } }); }); $("#gmap_brandclick").live('click',function(){ var ids = $(this).attr('data'); ids = ids.split('-'); var dealerNR = ids[0]; var brandNR = ids[1]; var geturl = $(this).attr('data'); geturl = geturl.split('-'); var urlParts = geturl.slice(2, geturl.length); var url = urlParts.join('-'); var dataString = 'dealerNR='+ dealerNR + '&brandNR=' + brandNR + '&url=' + url; $.ajax({ type: "POST", url: "/include/process/gmaps_brands_click.php", data: dataString, success: function(data){ window.open(url); }, error : function(data) { $(".contest_error").show("slow"); } }); }); /* SHOW POP-UP DIVS */ /* members home page / brands et more */ $('#showpopsignup, a#showpopsignup, #pblock_login').click(function(){ $('#popsignup').show(); return false; }); /* sign in */ $('#closepopsignup').click(function(){ $('#popsignup').hide(); return false; }); /* sign in */ /* members edit panel */ $('.mapdown').click(function(){ $('#m_admin_panel').show(); return false; }); /* member edit profile */ $('html').click(function() { $('#m_admin_panel, .pp_upl_overlay').hide(); }); $('#m_admin_panel, .pp_upl').click(function(event) { event.stopPropagation(); }); $('.mapup').click(function(event){ $('#m_admin_panel').toggle(); }); $('.bdx').click(function(){ $('.bdaybox').show(); return false; }); /* $('.anx').click(function(){ $('.anbox').show(); return false; }); $('.avx').click(function(){ $('.vidzbox').show(); return false; }); */ $('html').click(function() { $('.anbox,.vidzbox,.bdx, .contentBox,#popsignup').hide(); }); $('.anbox,#popsignup,#srl_results').click(function(event){ event.stopPropagation(); }); $('.pp_empty, .pp_set').click(function(){ $('.pp_upl_overlay, .pp_upl').show(); $("#upl_frm").attr("src", '/members/inc.upload.profile.photo.php'); return false; }); $('.pp_img').hover(function () { $('.pp_msg_overlay, .pp_msg_txt').show(); }, function () { $('.pp_msg_overlay, .pp_msg_txt').hide(); } ); $(".avx").live('click',function() { $('.contentBox').hide(); var box = $(this).attr('id'); var boxid = '#' + box + '-content'; $(boxid).show(); }); $(".alikem").click(function() { $('.contentBox').hide(); var box = $(this).attr('id'); var boxid = '#' + box + '-artists'; $.ajax({ type: "POST", url: "/include/process/member.artistlikes.inc.php", data:"boxID="+box , success : function(data) { $(boxid).show(); $('#' + box + '-artists').html(data); } }); }); $(".mlikem").click(function() { $('.contentBox').hide(); var box = $(this).attr('id'); var boxid = '#' + box + '-music'; $.ajax({ type: "POST", url: "/include/process/member.musiclikes.inc.php", data:"boxID="+box , success : function(data) { $(boxid).show(); $('#' + box + '-music').html(data); } }); }); $(".clikem").click(function() { $('.contentBox').hide(); var box = $(this).attr('id'); var boxid = '#' + box + '-comments'; $.ajax({ type: "POST", url: "/include/process/member.comments.inc.php", data:"boxID="+box , success : function(data) { $(boxid).show(); $('#' + box + '-comments').html(data); } }); }); $(".bdays").click(function() { $('.contentBox').hide(); var boxVars = $(this).attr('id'); boxVars = boxVars.split('-'); var box = boxVars[0]; var type = boxVars[1]; var boxid = '#' + box + '-birthdays'; var dataString = 'box='+ box + '&boxid=' + boxid; if(type === "a") { var gourl = "/artists/inc.artists.birthdays.pu.php"; } if(type === "m") { var gourl = "/include/process/member.pu.birthdaysm.inc.php"; } $.ajax({ type: "POST", url: gourl, data: dataString, success : function(data) { $(boxid).show(); $('#' + box + '-birthdays').html(data); } }); }); $(".anx").click(function() { $('.contentBox').hide(); var boxtype = $(this).attr('id'); var boxcontent = '#' + boxtype + '-box'; var dataString = 'boxtype='+ boxtype + '&boxcontent=' + boxcontent; $.ajax({ type: "POST", url: '/include/process/member.pu.artists.inc.php', data: dataString, success : function(data) { $(boxcontent).show(); $('#' + boxtype + '-box').html(data); }, error : function(data) { $(boxcontent).show().html('Oops! Something went wrong here. The error has been registered in our system and will be solved as soon as possible.'); } }); }); $(".bnx").click(function() { $('.contentBox').hide(); var boxtype = $(this).attr('id'); var boxcontent = '#' + boxtype + '-box'; var dataString = 'boxtype='+ boxtype + '&boxcontent=' + boxcontent; $.ajax({ type: "POST", url: '/include/process/member.pu.brands.inc.php', data: dataString, success : function(data) { $(boxcontent).show(); $('#' + boxtype + '-box').html(data); }, error : function(data) { $(boxcontent).show().html('Oops! Something went wrong here. The error has been registered in our system and will be solved as soon as possible.'); } }); }); $(".mlx").click(function() { $('.contentBox').hide(); var boxtype = $(this).attr('id'); var boxcontent = '#' + boxtype + '-box'; var dataString = 'boxtype='+ boxtype + '&boxcontent=' + boxcontent; $.ajax({ type: "POST", url: '/include/process/member.pu.members.inc.php', data: dataString, success : function(data) { $(boxcontent).show(); $('#' + boxtype + '-box').html(data); }, error : function(data) { $(boxcontent).show().html('Oops! Something went wrong here. The error has been registered in our system and will be solved as soon as possible.'); } }); }); $("#btnShowSimple, #scnd, #upload").live('click',function (e) { ShowDialog(false); e.preventDefault(); var page = $(this).attr('data-section'); if(page == 'terms') { $('.web_dialog_title').text("Terms of Use"); $(".web_dialog_content").load("/help/files/termsofuse.txt"); } if(page == 'copyright') { $('.web_dialog_title').text("Copyright"); $(".web_dialog_content").load("/help/files/copyright.txt"); } if(page == 'privacy') { $('.web_dialog_title').text("Privacy"); $(".web_dialog_content").load("/help/files/privacy.txt"); } if(page == 'cookie-use') { $('.web_dialog_title').text("Cookies"); $(".web_dialog_content").load("/help/files/cookie_use.txt"); } if(page == 'youtube-err') { $('.web_dialog_title').text("Missing video"); $(".web_dialog_content").load("/help/files/youtube_err.txt"); } }); $("#btnShowModal").click(function (e) { ShowDialog(true); e.preventDefault(); }); $("#btnClose").click(function (e) { HideDialog(); e.preventDefault(); }); function ShowDialog(modal) { $("#overlay").show(); $("#dialog").fadeIn(300); if (modal) { $("#overlay").unbind("click"); } else { $("#overlay").click(function (e) { HideDialog(); }); } } function HideDialog() { $("#overlay").hide(); $("#dialog").fadeOut(300); } /* .... */ /* var country = geoip_country_name(); alert(country);*/