Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * @author Sam De Decker
  3.  */
  4. $(document).ready(function(){
  5.     var params = { wmode: 'transparent'}
  6.     ;
  7.     swfobject.embedSWF('banner.swf', 'flashreel', 900, 120, '9.0.0', 'expressInstall.swf', null, params);
  8.    
  9.     $('#search-text').keyup(interceptSearch).attr('autocomplete', 'off');
  10.     $('body').click(function(){
  11.         $('#search ul').remove();
  12.     });
  13.     $("#innerheader a:first").click(function(){
  14.         $('#search ul').remove();
  15.     });
  16.     $('#search-text').Watermark("Zoek covers op titel");
  17.     $('#header').css("top", "-40px");
  18.    
  19.    
  20.     $("#innerheader a:first").toggle(function(){
  21.         $('#header').animate({
  22.             top: '0px'
  23.         }, 500, function(){
  24.             $("#innerheader a:first").removeClass('closeopen');
  25.             $("#innerheader a:first").addClass("openclose");
  26.             $.cookie('openclose', 'open');
  27.         });
  28.     }, function(){
  29.         $('#header').animate({
  30.             top: '-40px'
  31.        
  32.         }, 500, function(){
  33.             $("#innerheader a:first").removeClass('openclose');
  34.             $("#innerheader a:first").addClass("closeopen");
  35.             $.cookie('openclose', 'close');
  36.         });
  37.     });
  38.    
  39.     if ($.cookie('openclose') == 'open') {
  40.         $("#header").css({
  41.             "top": "0px"
  42.         });
  43.         $("#innerheader a:first").removeClass('closeopen');
  44.         $("#innerheader a:first").addClass("openclose");
  45.     }
  46.    
  47. });
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. function interceptSearch(e){
  61.     $.ajax({
  62.         type: "POST",
  63.         data: $(this).parent().parent().serialize(),
  64.         url: "index.php?page=search",
  65.         timeout: '3000',
  66.         error: function(XMLHttpRequest, textStatus, errorThrown){
  67.             alert('Error loading HTML document: ' + textStatus + ' - ' +
  68.             errorThrown);
  69.         },
  70.         success: function(data){
  71.             $('#search ul').remove();
  72.             $('#search').append(data);
  73.         }
  74.     });
  75. }
  76.  
  77.  
  78. function changeDetailsFromFlash(imagepath){
  79.     $.ajax({
  80.         type: "POST",
  81.         data: {
  82.             imgurl: imagepath
  83.         },
  84.         url: "index.php?page=detail",
  85.         timeout: '3000',
  86.         error: function(XMLHttpRequest, textStatus, errorThrown){
  87.             alert('Error loading HTML document: ' + textStatus + ' - ' + errorThrown);
  88.         },
  89.         success: function(data, textStatus){
  90.             $('#content').html(data);
  91.         }
  92.     });
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement