Guest User

Function

a guest
Oct 2nd, 2013
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function init_smarttalk( args ) {
  2.    
  3.     smarttalk = new smarttalkObj( args );
  4.  
  5.     var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {var r = Math.random()*16|0,v=c=='x'?r:r&0x3|0x8;return v.toString(16);});
  6.    
  7.     if( !jQuery.cookie('_smarttalk') ) {
  8.         jQuery.cookie('_smarttalk', uuid , { expires: 30, path: '/' });
  9.     } else {
  10.         //console.log( jQuery.cookie('_smarttalk') );
  11.     }
  12.  
  13.    
  14.     smarttalk.saveRecord();
  15.     smarttalk.callWindow();
  16.    
  17.     jQuery(window).load( function() {
  18.         jQuery( '#smart_close' ).on( 'click', 'a', function() {
  19.             jQuery( "#smart_window" ).hide();
  20.             jQuery( "#smart_overlay" ).hide();
  21.            
  22.             smarttalk.attempt();
  23.            
  24.             return false;
  25.            
  26.         });
  27.     });
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment