$(document).ready(function(){
   if ($("#logo-rotation").length > 0) {
      var flashvars = false;
      var flashvarobj = {};
         flashvarobj.preloader = {color: "0x254C73", alpha: 0.5, height: 2};
         flashvarobj.options = {forceXScale: false, allowYCenter: false, display:{type: "cmsPgHeaders"},query:"?ALBUMID=16&amp;SORTBY=name"};
         flashvarobj.masking = {enabled: false};//,width,height
         flashvarobj.transition = {type: "crossfade", delay: 3500, duration:1.5};
         flashvarobj.navigation = {type: "None", position:{loc: "BM", xpad: 0, ypad: 0}};

      var params = {};
         params.quality = "high";
         params.wmode = "transparent";
         params.allowFullScreen = "false";
         params.allowScriptAccess = "sameDomain";
         params.menu = "false";
         params.scale = "false";
         params.bgcolor = "#1B2121";
         params.flashvars = "JSON="+escape($.toJSON(flashvarobj))+"&debug=false";
      

      var attributes = {};
         attributes.id = "logo-rotation";
         attributes.name = "logo-rotation";

      swfobject.embedSWF("/flashplayer/php_slideshow_ui.swf", "logo-rotation", 98, 98, "9.0.0","/flashplayer/expressInstall.swf", flashvars, params, attributes);
      
      resize_homeGrid_columns();
   }
});
//---------------------------------------
$(window).load(function() {
   resize_homeGrid_columns();
});
//---------------------------------------
function resize_homeGrid_columns()
{
   if($("#homeGrid").length > 0)
   {
      var col_height = 100;
      $.each($("#homeGrid").find(".homeContent"),function(i,el){
         $(el).attr("style","");
         var el_height = $(el).height();

         if (el_height > col_height) {
            col_height = el_height;
            //return false;
         }//end if
         if (i > 3) return false;
      });

      $("#homeGrid div.homeContent").attr("style","height: " + col_height + "px");
      $("#homeContent #column5 .homeContent,#homeContent #column6 .homeContent").attr("style","");
   }
}
