
function echofirst(){
    items = $('body').data('text');
    try{
        $('#footercontent .titlebold').text(items[carousel1['first']]["title"]);
        $('title').text(items[carousel1['first']]["title"]);
    }
    catch (err){
    // not found
    }
    try{
        $('#footercontent .titlelight').text(items[carousel1['first']]["subtitle"]);
    } catch (err){
    // not found
    }

}

                


function adjustStyle() {

var h = $(this).height();
    if (h < 814) {   
        $(".slide").attr("width",800).attr("height",600);
        $("link[href$='css/style.css']").attr("href", "css/style-small.css");
        $("link[href$='css/skin.css']").attr("href", "css/skin-small.css");        
    } else {
        $(".slide").attr("width",1000).attr("height",750);
        $("link[href$='css/style-small.css']").attr("href", "css/style.css");
        $("link[href$='css/skin-small.css']").attr("href", "css/skin.css");
    }
}

(function ($) {
    // VERTICALLY ALIGN FUNCTION
    $.fn.vAlign = function() {
        return this.each(function(i){
            var ah = $(this).height();
            var ph = $(this).parent().height();
            var mh = Math.ceil((ph-ah) / 2);
            $(this).css('margin-top', mh);
        });
    };
})(jQuery);







