// JavaScript Document
if (top.location != location) {
    top.location.href = document.location.href ;
}
var theme_list_open = false;
/*
$(document).ready(function () {
    var links = $("#theme_list ul li a"),
    prev_area = $(".preview_picture"),
    title_tag = $('title');
    function fixHeight () {
        var headerHeight = $("#switcher").height();
        $("#iframe").attr("height", (($(window).height()) - headerHeight) + 'px');
    }
    $(window).resize(function (){
        fixHeight();
    }).resize();
    $("#theme_select").click( function (){
        if (theme_list_open == true){
            $(".center ul li ul").hide();
            prev_area.hide();
            theme_list_open = false;
        }else{
            var current = $('.hovered_item');
            if(current.length){
                prev_area.css({display:'block'}).html("<img src='" + current.attr("data-image") + "' alt=''/>");
            }
            $(".center ul li ul").show();
            theme_list_open = true;
        }
        return false;
    });
    links.click(function () {
        var current = $(this),
        theme_data = current.attr("data-rel").split(","),
        themename = current.find('.theme_name').text();
        $("li.purchase a").attr("href", theme_data[1]);
        $("li.remove_frame a").attr("href", theme_data[0]);
        $("#iframe").attr("src", theme_data[0]);
        $("#theme_list a#theme_select").text(themename);
        $(".center ul li ul").hide();
        prev_area.hide();
        if(title_tag.length && !$.browser.msie) title_tag.text('Kriesi.at Theme Demos | Theme: '+ themename);
        theme_list_open = false;
        return false;
    });
    links.hover(function(){
        var current = $(this);
        links.removeClass('hovered_item');
        current.addClass('hovered_item');
        prev_area.css({display:'block'}).html("<img src='" + current.attr("data-image") + "' alt=''/>");
    }, function(){});
});
*/

