$(document).ready(function(){
	
	$(".tickerBaseDimension").click(function(){
		
		//get the url
		
		//alert($(this).css('backgroundColor'));
		
		var uri = $(this).children('.tickerContent').children('.pLink').attr("href");
		var newUri = 'http://'+window.location.host+window.location.pathname+uri;
		window.location.href = newUri;


	});
	
	$(".tickerBaseDimension").mouseover(function(){
		//$(this).children('.tickerShadow').fadeIn(100);
		$(this).children('.tickerShadow').css('visibility','visible');

	});
	
	$(".tickerBaseDimension").mouseout(function(){

		$(this).children('.tickerShadow').css('visibility','hidden');

	});
	
});



(function ($) {
$.fn.iframeAutoHeight = function (options) {
    // set default option values
    var options = $.extend({
        heightOffset: 0
    }, options);

    // iterate over the matched elements passed to the plugin
    $(this).each(function () {
        // Check if browser is Opera or Safari(Webkit so Chrome as well)
        if ($.browser.safari || $.browser.opera) {
            // Start timer when loaded.
            $(this).load(function () {
                var iframe = this;
                var delayedResize = function () {
                    resizeHeight(iframe);
                };
                setTimeout(delayedResize, 0);
            });

            // Safari and Opera need a kick-start.
            var source = $(this).attr('src');
            $(this).attr('src', '');
            $(this).attr('src', source);
        }
        else {
            // For other browsers.
            $(this).load(function () {
                resizeHeight(this);
            });
        }

        // resizeHeight
        function resizeHeight(iframe) {
            // Set inline style to equal the body height of the iframed content plus a little
            var newHeight = iframe.contentWindow.document.body.offsetHeight + options.heightOffset;
            iframe.style.height = newHeight + 'px';
        }

    }); // end
}
})(jQuery);
