1. function checkIfFlash(){
  2. if( $('#SWADenver object').length ){
  3. $.log("flash enabled :)");
  4. //Hide JS related
  5. $('#jsgoeshere').hide();
  6.  
  7. $('#SWADenver').css({'height': 503});
  8. //Detect version and give popup to the upload
  9. playerVersion = swfobject.getFlashPlayerVersion();
  10. if(playerVersion.major < 9){
  11. if(confirm('You are running flash player'+playerVersion.major+ "." + playerVersion.minor + "." + playerVersion.release + ". For the best results, click Ok to proceed to www.adobe.com to update your flash player to a newer version, or cancel to continue without updating.")){
  12. window.location=("http://www.adobe.com/go/getflashplayer/");
  13. }else{
  14. //no update
  15. }
  16. }
  17. } else {
  18. $.log("no flash enabled :(");
  19. $('#SWADenver').css({'height': 410});
  20. //LOAD THE JS CAROUSEL AFTER THE PAGE AND ALL OTHER SCRIPTS IF NO FLASH IS ENABLED
  21. $("#carousel-noscript").hide();
  22. $('#d_carousel .content').hide();
  23. $('#d_carousel #no-script').hide();
  24. $('#d_carousel .content').load("ajax_carousel.html", function(){
  25. setTimeout( function(){
  26. $('#d_carousel #loading').fadeTo(1000, 0, function(){ $(this).remove();});
  27. $('#d_carousel .content').fadeIn(1200, function(){
  28. $(this).css({'display': 'block'});
  29. });
  30. }, 1200 );
  31. });
  32. }
  33. }