/* * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ * * Uses the built in easing capabilities added In jQuery 1.1 * to offer multiple easing options * * TERMS OF USE - jQuery Easing * * Open source under the BSD License. * * Copyright © 2008 George McGinley Smith * All rights reserved. */ // t: current time, b: begInnIng value, c: change In value, d: duration jQuery.easing['jswing'] = jQuery.easing['swing']; jQuery.extend( jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d) { //alert(jQuery.easing.default); return jQuery.easing[jQuery.easing.def](x, t, b, c, d); }, easeInQuad: function (x, t, b, c, d) { return c*(t/=d)*t + b; }, easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; }, easeInOutQuad: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; }, easeInCubic: function (x, t, b, c, d) { return c*(t/=d)*t*t + b; }, easeOutCubic: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t + 1) + b; }, easeInOutCubic: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; }, easeInQuart: function (x, t, b, c, d) { return c*(t/=d)*t*t*t + b; }, easeOutQuart: function (x, t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; }, easeInOutQuart: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; }, easeInQuint: function (x, t, b, c, d) { return c*(t/=d)*t*t*t*t + b; }, easeOutQuint: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t*t*t + 1) + b; }, easeInOutQuint: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b; }, easeInSine: function (x, t, b, c, d) { return -c * Math.cos(t/d * (Math.PI/2)) + c + b; }, easeOutSine: function (x, t, b, c, d) { return c * Math.sin(t/d * (Math.PI/2)) + b; }, easeInOutSine: function (x, t, b, c, d) { return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; }, easeInExpo: function (x, t, b, c, d) { return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; }, easeOutExpo: function (x, t, b, c, d) { return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; }, easeInOutExpo: function (x, t, b, c, d) { if (t==0) return b; if (t==d) return b+c; if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; }, easeInCirc: function (x, t, b, c, d) { return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; }, easeOutCirc: function (x, t, b, c, d) { return c * Math.sqrt(1 - (t=t/d-1)*t) + b; }, easeInOutCirc: function (x, t, b, c, d) { if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; }, easeInElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; }, easeOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; }, easeInOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; }, easeInBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*(t/=d)*t*((s+1)*t - s) + b; }, easeOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; }, easeInOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; }, easeInBounce: function (x, t, b, c, d) { return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; }, easeOutBounce: function (x, t, b, c, d) { if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b; } else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; } else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; } else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; } }, easeInOutBounce: function (x, t, b, c, d) { if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; } }); /** * jQuery.ScrollTo - Easy element scrolling using jQuery. * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under MIT and GPL. * Date: 5/25/2009 * @author Ariel Flesler * @version 1.4.2 * * http://flesler.blogspot.com/2007/10/jqueryscrollto.html */ ;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); var profiles = { window500: { height:500, width:500, status:0, location:0, center:1, resizable:0, onUnload:unloadcallback }, windowNotNew: { height:300, width:400, center:1, createnew:0 }, windowCallUnload: { height:300, width:400, center:1, onUnload:unloadcallback } }; function unloadcallback(){ //alert("unloaded"); nLat = jQuery(".popupwindow").jQuery("#latboxa").val(); nLng = jQuery("#lngboxa").val(); alert(nLat + nLng); jQuery('input[name=lat]').val() = jQuery("#latboxa").val(); jQuery('input[name=lng]').val() = jQuery("#lngboxa").val(); }; jQuery(function() { jQuery(".popupwindow").popupwindow(profiles); }); var time_variable; function getXMLObject() { var xmlHttp = false; try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP") } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP") } catch (e2) { xmlHttp = false // No Browser accepts the XMLHTTP Object then false } } if (!xmlHttp && typeof XMLHttpRequest != 'undefined') { xmlHttp = new XMLHttpRequest(); //For Mozilla, Opera Browsers } return xmlHttp; // Mandatory Statement returning the ajax object created } var xmlHttp = new getXMLObject(); //xmlhttp holds the ajax object function ajaxFunction(cid,usr,mid,fbutton) { var getdate = new Date(); if(xmlHttp) { xmlHttp.open("POST","/follow.php",true); xmlHttp.onreadystatechange = handleServerResponse; followmessagebox = mid; followboxbutton = fbutton; xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlHttp.send("follow=" + cid+"&username="+usr); } } function handleServerResponse() { if (xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { document.getElementById(followmessagebox).innerHTML=xmlHttp.responseText; //Update the HTML Form element document.getElementById(followmessagebox).fade(); //Fade document.getElementById(followboxbutton).fade(); } else { alert("Error during AJAX call. Please try again"); } } } function startUpload(){ document.getElementById('f1_upload_process').style.visibility = 'visible'; document.getElementById('f1_upload_form').style.visibility = 'hidden'; return true; } function stopUpload(success){ var result = ''; if (success == 1){ result = 'The file was uploaded successfully!<\/span>

'; } else if (success == 3){ result = 'The file uploaded was not the correct type try either an .mp3 or a .wav file<\/span>

'; } else { result = 'There was an error during file upload!<\/span>

'; } document.getElementById('f1_upload_process').style.visibility = 'hidden'; document.getElementById('f1_upload_form').innerHTML = result + 'Refresh'; document.getElementById('f1_upload_form').style.visibility = 'visible'; return true; } var favhold = ''; function doFavorite(cid,fav) { var getdate = new Date(); //Used to prevent caching during ajax call if(xmlHttp) { xmlHttp.open("POST","/util.php",true); //calling favorite.php using POST method favhold = fav; xmlHttp.onreadystatechange = handleServerResponseFavorite; xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlHttp.send("op=favorite&"+"cid=" + cid); //chirbit id } } function handleServerResponseFavorite() { if (xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { document.getElementById(favhold).innerHTML=xmlHttp.responseText; //Update the HTML Form element } else { alert("Error during AJAX call. Please try again"); } } } var chirbithold = ''; function doDelete(cid,del) { var answer = confirm("Do you really want to delete this Chirbit?") if(answer) { var getdate = new Date(); if(xmlHttp) { xmlHttp.open("POST","util.php",true); chirbithold = del; xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlHttp.onreadystatechange = handleServerResponseDelete; xmlHttp.send("op=delete&cid=" + cid); } } else { alert("O.K. It stays undeleted") } } function handleServerResponseDelete() { if (xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { document.getElementById(chirbithold).innerHTML=xmlHttp.responseText; //Update the HTML Form element document.getElementById(chirbithold).fade(); //Update the HTML Form element } else { alert("Error during AJAX call. Please try again"); } } } var spamithold = ''; function doSpamComment(cid,spamit) { var getdate = new Date(); //Used to prevent caching during ajax call if(xmlHttp) { xmlHttp.open("POST","/util.php",true); //calling favorite.php using POST method spamithold = spamit; xmlHttp.onreadystatechange = handleServerResponseSpam; xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlHttp.send("op=spam&"+"cid=" + cid); //chirbit id } } function handleServerResponseSpam() { if (xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { document.getElementById(spamithold).innerHTML=xmlHttp.responseText; //Update the HTML Form element } else { alert("Error during AJAX call. Please try again"); } } } var commentholder = ''; function doCommentDelete(cid,thediv) { var answer = confirm("Do you really want to delete this Comment?") if(answer) { var getdate = new Date(); //Used to prevent caching during ajax call if(xmlHttp) { xmlHttp.open("POST","/util.php",true); //calling util.php using POST method commentholder = thediv; xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlHttp.onreadystatechange = handleServerResponseDeleteCom; xmlHttp.send("op=deletecomment&"+"cid=" + cid); } } else { alert("O.K. It stays undeleted") } } function handleServerResponseDeleteCom() { if (xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { document.getElementById(commentholder).innerHTML=xmlHttp.responseText; //Update the HTML Form element } else { alert("Error during AJAX call. Please try again:"+commentholder); } } } var flaghold = ''; function doFlagInappropriate(cid,flagit) { var getdate = new Date(); //Used to prevent caching during ajax call if(xmlHttp) { xmlHttp.open("POST","/util.php",true); //calling favorite.php using POST method flaghold = flagit; xmlHttp.onreadystatechange = handleServerResponseFlag; xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlHttp.send("op=flag&"+"cid=" + cid); //chirbit id } } function handleServerResponseFlag() { if (xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { document.getElementById(flaghold).innerHTML=xmlHttp.responseText; //Update the HTML Form element } else { alert("Error during AJAX call. Please try again"); } } } var chirbitholdb = ''; function doDeleteMessage(cid,del) { var answer = confirm("Do you really want to delete this Message?") if(answer) { var getdate = new Date(); //Used to prevent caching during ajax call if(xmlHttp) { xmlHttp.open("POST","util.php",true); //calling favorite.php using POST method chirbitholdb = del; xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlHttp.onreadystatechange = handleServerResponseDeleteMessage; xmlHttp.send("op=deletemessage&cid=" + cid); //chirbit id } } else { alert("O.K. It stays undeleted") } } function handleServerResponseDeleteMessage() { if (xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { document.getElementById(chirbitholdb).innerHTML=xmlHttp.responseText; //Update the HTML Form element document.getElementById(chirbitholdb).fade(); //Update the HTML Form element } else { alert("Error during AJAX call. Please try again"); } } } function doCheckUsername() { var getdate = new Date(); //Used to prevent caching during ajax call if(xmlHttp) { xmlHttp.open("POST","util.php",true); //calling favorite.php using POST method xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlHttp.onreadystatechange = handleServerResponseUserCheck; username = document.getElementById('username').value; xmlHttp.send("op=checkUserName&username=" + username); //chirbit id } } function handleServerResponseUserCheck() { if (xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { document.getElementById('urlspan').innerHTML=xmlHttp.responseText; //Update the HTML Form element document.getElementById('usrinfo').visible = true; //Update the HTML Form element jQuery('#errordiv').html('Please Remove all Spaces from your username!'); jQuery('#errordiv').css({"font-size":"14pt","color":"Yellow","font-weight":"Bold","margin-top":"20px;"}); } else { alert("Error during AJAX call. Please try again"); } } } function FadeComment(element){ new Effect.Fade(element, { duration:1}); } // NiftyPlayer 1.7, by tvst from varal.org // Released under the MIT License: http://www.opensource.org/licenses/mit-license.php var FlashHelper = { movieIsLoaded : function (theMovie) { if (typeof(theMovie) != "undefined") return theMovie.PercentLoaded() == 100; else return false; }, getMovie : function (movieName) { if (navigator.appName.indexOf ("Microsoft") !=-1) return window[movieName]; else return document[movieName]; } }; function cplay(name) { this.obj = FlashHelper.getMovie(name); if (!FlashHelper.movieIsLoaded(this.obj)) return; this.play = function () { this.obj.TCallLabel('/','play'); }; this.stop = function () { this.obj.TCallLabel('/','stop'); }; this.pause = function () { this.obj.TCallLabel('/','pause'); }; this.playToggle = function () { this.obj.TCallLabel('/','playToggle'); }; this.reset = function () { this.obj.TCallLabel('/','reset'); }; this.load = function (url) { this.obj.SetVariable('currentSong', url); this.obj.TCallLabel('/','load'); }; this.loadAndPlay = function (url) { this.load(url); this.play(); }; this.getState = function () { var ps = this.obj.GetVariable('playingState'); var ls = this.obj.GetVariable('loadingState'); if (ps == 'playing') if (ls == 'loaded') return ps; else return ls; if (ps == 'stopped') if (ls == 'empty') return ls; if (ls == 'error') return ls; else return ps; return ps; }; this.getPlayingState = function () { return this.obj.GetVariable('playingState'); }; this.getLoadingState = function () { return this.obj.GetVariable('loadingState'); }; this.registerEvent = function (eventName, action) { this.obj.SetVariable(eventName, action);}; return this; } // end Nifty var myCurrentReply; var myChops; jQuery(document).ready(function() { jQuery('.helpanswer').hide(); jQuery('.helpquestion').click(function() { jQuery(this).next('.helpanswer').slideToggle(600); jQuery(this).find('.faqtoggle').toggleClass('ftplus'); }); jQuery('#ex1').jqm({ajax: '/chirbit.video.inc.php', trigger: 'a.ex1trigger',toTop: true,modal:false}); jQuery('#ex9').jqm({ajax: '@href', trigger: 'a.ytu',toTop: true,modal:true}); jQuery('.chirbit').children('.ubwrapper').children('.utilitybox').hide(); jQuery('.chirbit').mouseover(function() { jQuery(this).children('.ubwrapper').children('.utilitybox').show(); }); jQuery('.chirbit').mouseout(function() { jQuery(this).children('.ubwrapper').children('.utilitybox').hide(); }); setupLinks(); }); var clip = null; var hh = null; function setupLinks() { clip = new ZeroClipboard.Client(); clip.setHandCursor(true); jQuery('.copylinkbox').mouseover( function() { var url = jQuery(this).prev().attr('href'); clip.setText(url); if (clip.div) { clip.receiveEvent('mouseout', null); clip.reposition(this); } else { clip.glue(this); } clip.receiveEvent('mouseover', null); }); clip.addEventListener( 'complete', function(client, text) { alert("Copied text to clipboard: " + text ); }); }