var Sealord = {};

Sealord.siteFinityJQ = function()
{
    try{ if (!$telerik.$ == true) $telerik.$ = jQuery; } catch(e) {}
}

// Additional table style hooks for .formatted tables
Sealord.formatTables = function()
{
    $('tr :first-child').each(function(i)
    {
	$(this).addClass('first');
    });
    
    rows = $('tr');
    for(i=0, count=rows.length; i<count; i++)
    {
	row = rows[i];
	$(row).addClass(i % 2 == 0 ? 'odd' : 'even');
	spanRows = $(row).children('.first[rowspan]')
	if(spanRows.length > 0)
	{
	    rowSpan = $(spanRows[0]).attr('rowspan')
	    for(j=i+1, count2=i+rowSpan; j<count2; j++)
	    {
		row2 = rows[j];
		$(row2).children('.first').removeClass('first');
	    }
	}
    }
}
Sealord.formatLeftNav = function()
{
    expanded = $('#left-nav li.expanded');
    if(expanded.length > 0)
    {
	var el = expanded[0];
	var children = $(el).children('ul');
	var hasChildren = children.length > 0;
	if(!hasChildren) { $(el).addClass('no-children') }
	else
	{
	    $(el).addClass('has-children')
		.children('ul').children('li:last-child').addClass('last');
	}
    }
}


Sealord.CheckForRunOnce = function()
{
    $.getScript("/static/scripts/jquery.Storage.js", function()
    {
	if ($.Storage.get("runOnce") == null)
	{
	    $.Storage.set('runOnce', '1');
	    Sealord.LoadInitialPopup();
	}
    });
}


Sealord.LoadInitialPopup = function()
{
    var html = '<a onclick="$.fancybox.close();" href="javascript:;" style="display: block">';
	html += '<img src="/static/images/a-new-dawn-overlay.jpg" alt="" width="662" height="475" />';
	html +='</a>';
    $("#runOnce").html(html);

    $("#hiddenclicker").fancybox({
        'modal': true,
	autoDimensions: true
    });

    var j1 = document.getElementById("hiddenclicker");
	j1.href = "#runOnce";
	$('#hiddenclicker').trigger('click');
}


Sealord.equalHeight = function(group) {
    var tallest = 0;
    group.each(function () {
        var thisHeight = $(this).height();
        if (thisHeight > tallest) {
            tallest = thisHeight;
        }
    });
    group.height(tallest);
}

Sealord.equalInRow = function(passedObject, numberOfCols) {
    var newArray = new Object();
    $.each(passedObject, function (key) {
        newArray = $.merge(passedObject.eq(key), newArray);
        if ((newArray.length == numberOfCols) || (key == (passedObject.length - 1))) {
            equalHeight($(newArray));
            newArray = new Object();
        }
    });
}


Sealord.buildMegaDropDown = function()
{
    $("#foo1").carouFredSel({
	auto: false,
	circular: false,
	infinite: false,
	scroll: {
	    duration: 1500
	},
	height: 400,
	prev: "#foo1_prev",
	next: "#foo1_next"
    });
    
    $("#foo2").carouFredSel({
	auto: false,
	circular: false,
	infinite: false,
	scroll: {
	    duration: 1500
	},
	height: 380,
	prev: "#foo2_prev",
	next: "#foo2_next"
    });
    
    Sealord.equalHeight($("#main-nav .item em")); // equalize heights of headings in the mega drop-down menu
    $('.range-box').hide(); //after carousel initiated (see above), can hide this (display:none) and remove 'visuallyhidden'
    $('.range-box').removeClass('visuallyhidden');
    $('#tab2').hide();
    $('#tab2').removeClass('visuallyhidden');

    var products = $('#main-nav li#our-range');
    products.hover(function () { $(this).find('div.range-box').stop(true, true).slideDown(300); },
        function () {
           $(this).find('div.range-box').stop(true, true).delay(500).slideUp(100);
        }
    );
    
    $('.range-box .item > a:nth-child(1)').addClass('first');
}


Sealord.siteFinityJQ()


/*
*  jQuery selectBox (version 1.0.1)
*
*  Copyright 2011 Cory LaViska for A Beautiful Site, LLC.
*
*  http://abeautifulsite.net/blog/2011/01/jquery-selectbox-plugin/
*
*/
if (jQuery) (function ($) { $.extend($.fn, { selectBox: function (method, data) { var typeTimer, typeSearch = ''; var init = function (select, data) { if (navigator.userAgent.match(/iPad|iPhone/i)) return false; if (select.tagName.toLowerCase() !== 'select') return false; select = $(select); if (select.data('selectBox-control')) return false; var control = $('<a class="selectBox" />'), inline = select.attr('multiple') || parseInt(select.attr('size')) > 1; var settings = data || {}; control.addClass(select.attr('class')).attr('style', select.attr('style') || '').attr('title', select.attr('title') || '').attr('tabindex', parseInt(select.attr('tabindex'))).css('display', 'inline-block').bind('focus.selectBox', function () { if (this !== document.activeElement) $(document.activeElement).blur(); if (control.hasClass('selectBox-active')) return; control.addClass('selectBox-active'); select.trigger('focus') }).bind('blur.selectBox', function () { if (!control.hasClass('selectBox-active')) return; control.removeClass('selectBox-active'); select.trigger('blur') }); if (select.attr('disabled')) control.addClass('selectBox-disabled'); if (inline) { var options = getOptions(select, 'inline'); control.append(options).data('selectBox-options', options).addClass('selectBox-inline').addClass('selectBox-menuShowing').bind('keydown.selectBox', function (event) { handleKeyDown(select, event) }).bind('keypress.selectBox', function (event) { handleKeyPress(select, event) }).insertAfter(select); width = control.width(); control.css('width', width); width = width - (parseInt(control.outerWidth()) - parseInt(control.width())); control.css('width', width); if (!select[0].style.height) { var optionHeight = parseInt(control.find('.selectBox-options A:first').height()); var size = select.attr('size') ? parseInt(select.attr('size')) : 5; control.height(optionHeight * size) } disableSelection(control) } else { var label = $('<span class="selectBox-label" />'), arrow = $('<span class="selectBox-arrow" />'); label.text($(select).find('OPTION:selected').text() || '\u00A0'); var options = getOptions(select, 'dropdown'); options.appendTo('BODY'); control.data('selectBox-options', options).addClass('selectBox-dropdown').append(label).append(arrow).bind('mousedown.selectBox', function (event) { if (control.hasClass('selectBox-menuShowing')) { hideMenus() } else { event.stopPropagation(); options.data('selectBox-down-at-x', event.screenX).data('selectBox-down-at-y', event.screenY); showMenu(select) } }).bind('keydown.selectBox', function (event) { handleKeyDown(select, event) }).bind('keypress.selectBox', function (event) { handleKeyPress(select, event) }).insertAfter(select); width = control.width(); control.css('width', width); width = width - (parseInt(control.outerWidth()) - parseInt(control.width())); control.css('width', width); disableSelection(control) } select.addClass('selectBox').data('selectBox-control', control).data('selectBox-settings', settings).hide() }; var getOptions = function (select, type) { var options; switch (type) { case 'inline': options = $('<ul class="selectBox-options" />'); if (select.find('OPTGROUP').length) { select.find('OPTGROUP').each(function () { var optgroup = $('<li class="selectBox-optgroup" />'); optgroup.text($(this).attr('label')); options.append(optgroup); $(this).find('OPTION').each(function () { var li = $('<li />'), a = $('<a />'); li.addClass($(this).attr('class')); a.attr('rel', $(this).val()).text($(this).text()); li.append(a); if ($(this).attr('disabled')) li.addClass('selectBox-disabled'); if ($(this).attr('selected')) li.addClass('selectBox-selected'); options.append(li) }) }) } else { select.find('OPTION').each(function () { var li = $('<li />'), a = $('<a />'); li.addClass($(this).attr('class')); a.attr('rel', $(this).val()).text($(this).text()); li.append(a); if ($(this).attr('disabled')) li.addClass('selectBox-disabled'); if ($(this).attr('selected')) li.addClass('selectBox-selected'); options.append(li) }) } options.find('A').bind('mouseover.selectBox', function (event) { addHover(select, $(this).parent()) }).bind('mouseout.selectBox', function (event) { removeHover(select, $(this).parent()) }).bind('mousedown.selectBox', function (event) { event.preventDefault() }).bind('mouseup.selectBox', function (event) { hideMenus(); if (event.shiftKey) { selectOption(select, $(this).parent(), true) } else { selectOption(select, $(this).parent(), false) } }); disableSelection(options); return options; case 'dropdown': options = $('<ul class="selectBox-dropdown-menu selectBox-options" />'); if (select.find('OPTGROUP').length) { select.find('OPTGROUP').each(function () { var optgroup = $('<li class="selectBox-optgroup" />'); optgroup.text($(this).attr('label')); options.append(optgroup); $(this).find('OPTION').each(function () { var li = $('<li />'), a = $('<a />'); li.addClass($(this).attr('class')); a.attr('rel', $(this).val()).text($(this).text()); li.append(a); if ($(this).attr('disabled')) li.addClass('selectBox-disabled'); if ($(this).attr('selected')) li.addClass('selectBox-selected'); options.append(li) }) }) } else { select.find('OPTION').each(function () { var li = $('<li />'), a = $('<a />'); li.addClass($(this).attr('class')); a.attr('rel', $(this).val()).text($(this).text()); li.append(a); if ($(this).attr('disabled')) li.addClass('selectBox-disabled'); if ($(this).attr('selected')) li.addClass('selectBox-selected'); options.append(li) }) } options.data('selectBox-select', select).css('display', 'none').appendTo('BODY').find('A').bind('mousedown.selectBox', function (event) { event.preventDefault(); if (event.screenX === options.data('selectBox-down-at-x') && event.screenY === options.data('selectBox-down-at-y')) { options.removeData('selectBox-down-at-x').removeData('selectBox-down-at-y'); hideMenus() } }).bind('mouseup.selectBox', function (event) { if (event.screenX === options.data('selectBox-down-at-x') && event.screenY === options.data('selectBox-down-at-y')) { return } else { options.removeData('selectBox-down-at-x').removeData('selectBox-down-at-y') } selectOption(select, $(this).parent()); hideMenus() }).bind('mouseover.selectBox', function (event) { addHover(select, $(this).parent()) }).bind('mouseout.selectBox', function (event) { removeHover(select, $(this).parent()) }); disableSelection(options); return options } }; var destroy = function (select) { select = $(select); var control = select.data('selectBox-control'); if (!control) return; var options = control.data('selectBox-options'); options.remove(); control.remove(); select.removeClass('selectBox').removeData('selectBox-control').removeData('selectBox-settings').show() }; var showMenu = function (select) { select = $(select); var control = select.data('selectBox-control'), settings = select.data('selectBox-settings'), options = control.data('selectBox-options'); if (control.hasClass('selectBox-disabled')) return false; hideMenus(); options.css({ width: control.outerWidth() - (parseInt(control.css('borderLeftWidth')) + parseInt(control.css('borderLeftWidth'))), top: control.offset().top + control.outerHeight() - (parseInt(control.css('borderBottomWidth'))), left: control.offset().left }); switch (settings.menuTransition) { case 'fade': options.fadeIn(settings.menuSpeed); break; case 'slide': options.slideDown(settings.menuSpeed); break; default: options.show(settings.menuSpeed); break } var li = options.find('.selectBox-selected:first'); keepOptionInView(select, li, true); addHover(select, li); control.addClass('selectBox-menuShowing'); $(document).bind('mousedown.selectBox', function (event) { if ($(event.target).parents().andSelf().hasClass('selectBox-options')) return; hideMenus() }) }; var hideMenus = function () { if ($(".selectBox-dropdown-menu").length === 0) return; $(document).unbind('mousedown.selectBox'); $(".selectBox-dropdown-menu").each(function () { var options = $(this), select = options.data('selectBox-select'), control = select.data('selectBox-control'), settings = select.data('selectBox-settings'); switch (settings.menuTransition) { case 'fade': options.fadeOut(settings.menuSpeed); break; case 'slide': options.slideUp(settings.menuSpeed); break; default: options.hide(settings.menuSpeed); break } control.removeClass('selectBox-menuShowing') }) }; var selectOption = function (select, li, selectRange) { select = $(select); li = $(li); var control = select.data('selectBox-control'), settings = select.data('selectBox-settings'); if (control.hasClass('selectBox-disabled')) return false; if (li.length === 0 || li.hasClass('selectBox-disabled')) return false; if (select.attr('multiple')) { if (selectRange && control.data('selectBox-last-selected')) { li.toggleClass('selectBox-selected'); var affectedOptions; if (li.index() > control.data('selectBox-last-selected').index()) { affectedOptions = li.siblings().slice(control.data('selectBox-last-selected').index(), li.index()) } else { affectedOptions = li.siblings().slice(li.index(), control.data('selectBox-last-selected').index()) } affectedOptions = affectedOptions.not('.selectBox-optgroup, .selectBox-disabled'); if (li.hasClass('selectBox-selected')) { affectedOptions.addClass('selectBox-selected') } else { affectedOptions.removeClass('selectBox-selected') } } else { li.toggleClass('selectBox-selected') } } else { li.siblings().removeClass('selectBox-selected'); li.addClass('selectBox-selected') } if (control.hasClass('selectBox-dropdown')) { control.find('.selectBox-label').text(li.text()) } var i = 0, selection = []; if (select.attr('multiple')) { control.find('.selectBox-selected A').each(function () { selection[i++] = $(this).attr('rel') }) } else { selection = li.find('A').attr('rel') } control.data('selectBox-last-selected', li); if (select.val() !== selection) { select.val(selection); select.trigger('change') } return true }; var addHover = function (select, li) { select = $(select); li = $(li); var control = select.data('selectBox-control'), options = control.data('selectBox-options'); options.find('.selectBox-hover').removeClass('selectBox-hover'); li.addClass('selectBox-hover') }; var removeHover = function (select, li) { select = $(select); li = $(li); var control = select.data('selectBox-control'), options = control.data('selectBox-options'); options.find('.selectBox-hover').removeClass('selectBox-hover') }; var keepOptionInView = function (select, li, center) { if (!li || li.length === 0) return; select = $(select); var control = select.data('selectBox-control'), options = control.data('selectBox-options'), scrollBox = control.hasClass('selectBox-dropdown') ? options : options.parent(), top = parseInt(li.offset().top - scrollBox.position().top), bottom = parseInt(top + li.outerHeight()); if (center) { scrollBox.scrollTop(li.offset().top - scrollBox.offset().top + scrollBox.scrollTop() - (scrollBox.height() / 2)) } else { if (top < 0) { scrollBox.scrollTop(li.offset().top - scrollBox.offset().top + scrollBox.scrollTop()) } if (bottom > scrollBox.height()) { scrollBox.scrollTop((li.offset().top + li.outerHeight()) - scrollBox.offset().top + scrollBox.scrollTop() - scrollBox.height()) } } }; var handleKeyDown = function (select, event) { select = $(select); var control = select.data('selectBox-control'), options = control.data('selectBox-options'), totalOptions = 0, i = 0; if (control.hasClass('selectBox-disabled')) return; switch (event.keyCode) { case 8: event.preventDefault(); typeSearch = ''; break; case 9: case 27: hideMenus(); removeHover(select); break; case 13: if (control.hasClass('selectBox-menuShowing')) { selectOption(select, options.find('LI.selectBox-hover:first'), event.shiftKey); if (control.hasClass('selectBox-dropdown')) hideMenus() } else { showMenu(select) } break; case 38: case 37: event.preventDefault(); if (control.hasClass('selectBox-menuShowing')) { var prev = options.find('.selectBox-hover').prev('LI'); totalOptions = options.find('LI:not(.selectBox-optgroup)').length; i = 0; while (prev.length === 0 || prev.hasClass('selectBox-disabled') || prev.hasClass('selectBox-optgroup')) { prev = prev.prev('LI'); if (prev.length === 0) prev = options.find('LI:last'); if (++i >= totalOptions) break } addHover(select, prev); keepOptionInView(select, prev) } else { showMenu(select) } break; case 40: case 39: event.preventDefault(); if (control.hasClass('selectBox-menuShowing')) { var next = options.find('.selectBox-hover').next('LI'); totalOptions = options.find('LI:not(.selectBox-optgroup)').length; i = 0; while (next.length === 0 || next.hasClass('selectBox-disabled') || next.hasClass('selectBox-optgroup')) { next = next.next('LI'); if (next.length === 0) next = options.find('LI:first'); if (++i >= totalOptions) break } addHover(select, next); keepOptionInView(select, next) } else { showMenu(select) } break } }; var handleKeyPress = function (select, event) { select = $(select); var control = select.data('selectBox-control'), options = control.data('selectBox-options'); if (control.hasClass('selectBox-disabled')) return; switch (event.keyCode) { case 9: case 27: case 13: case 38: case 37: case 40: case 39: break; default: if (!control.hasClass('selectBox-menuShowing')) showMenu(select); event.preventDefault(); clearTimeout(typeTimer); typeSearch += String.fromCharCode(event.charCode || event.keyCode); options.find('A').each(function () { if ($(this).text().substr(0, typeSearch.length).toLowerCase() === typeSearch.toLowerCase()) { addHover(select, $(this).parent()); keepOptionInView(select, $(this).parent()); return false } }); typeTimer = setTimeout(function () { typeSearch = '' }, 1000); break } }; var enable = function (select) { select = $(select); select.attr('disabled', false); var control = select.data('selectBox-control'); if (!control) return; control.removeClass('selectBox-disabled') }; var disable = function (select) { select = $(select); select.attr('disabled', true); var control = select.data('selectBox-control'); if (!control) return; control.addClass('selectBox-disabled') }; var setValue = function (select, value) { select = $(select); select.val(value); value = select.val(); var control = select.data('selectBox-control'), settings = select.data('selectBox-settings'), options = control.data('selectBox-options'); if (!control) return; control.find('.selectBox-label').text($(select).find('OPTION:selected').text() || '\u00A0'); options.find('.selectBox-selected').removeClass('selectBox-selected'); options.find('A').each(function () { if (typeof (value) === 'object') { for (var i = 0; i < value.length; i++) { if ($(this).attr('rel') == value[i]) { $(this).parent().addClass('selectBox-selected') } } } else { if ($(this).attr('rel') == value) { $(this).parent().addClass('selectBox-selected') } } }); if (settings.change) settings.change.call(select) }; var setOptions = function (select, options) { select = $(select); var control = select.data('selectBox-control'), settings = select.data('selectBox-settings'); switch (typeof (data)) { case 'string': select.html(data); break; case 'object': select.html(''); for (var i in data) { if (data[i] === null) continue; if (typeof (data[i]) === 'object') { var optgroup = $('<optgroup label="' + i + '" />'); for (var j in data[i]) { optgroup.append('<option value="' + j + '">' + data[i][j] + '</option>') } select.append(optgroup) } else { var option = $('<option value="' + i + '">' + data[i] + '</option>'); select.append(option) } } break } if (!control) return; control.data('selectBox-options').remove(); var type = control.hasClass('selectBox-dropdown') ? 'dropdown' : 'inline', options = getOptions(select, type); control.data('selectBox-options', options); switch (type) { case 'inline': control.append(options); break; case 'dropdown': control.find('.selectBox-label').text($(select).find('OPTION:selected').text() || '\u00A0'); $("BODY").append(options); break } }; var disableSelection = function (selector) { $(selector).css('MozUserSelect', 'none').bind('selectstart', function (event) { event.preventDefault() }) }; switch (method) { case 'settings': if (!data) return $(this).data('selectBox-settings'); $(this).each(function () { $(this).data('selectBox-settings', $.extend(true, $(this).data('selectBox-settings'), data)) }); break; case 'options': $(this).each(function () { setOptions(this, data) }); break; case 'value': if (!data) return $(this).val(); $(this).each(function () { setValue(this, data) }); break; case 'enable': $(this).each(function () { enable(this) }); break; case 'disable': $(this).each(function () { disable(this) }); break; case 'destroy': $(this).each(function () { destroy(this) }); break; default: $(this).each(function () { init(this, method) }); break } return $(this) } }) })(jQuery);


// ************************************************************/

var equalHeight = Sealord.equalHeight;
var equalInRow = Sealord.equalInRow;





//************************************************************/
$(document).ready(function () {
    Sealord.formatTables();
    Sealord.formatLeftNav();
    Sealord.CheckForRunOnce();

    $('input[placeholder], textarea[placeholder]').placeholder();

    Sealord.buildMegaDropDown();

    var tabContainers = $('#tab1, #tab2');
    $('#sub-nav-tabbed a').click(function () {
        tabContainers.hide().filter(this.hash).show();

        $('#sub-nav-tabbed a').removeClass('selected');
        $(this).addClass('selected');
        return false;
    }).filter(':first').click();


    // SUBPAGES

    // **** product details- tabbs, scroll

    if ($(".tabbed-box").length > 0) {
        var currentTab = 0; // Set to a different number to start on a different tab.
        function openTab(clickedTab) {
            var thisTab = $(".tabbed-box .tabs a").index(clickedTab);
            $(".tabbed-box .tabs li a").removeClass("active");
            $(".tabbed-box .tabs li a:eq(" + thisTab + ")").addClass("active");
            $(".tabbed-box .tabbed-content").hide();
            $(".tabbed-box .tabbed-content:eq(" + thisTab + ")").show();
            currentTab = thisTab;
        }

        $(".tabbed-box .tabs li a").click(function () {
            if ($('html').hasClass('no-boxshadow') && !$('html').hasClass('ie6')) { $("img.shadow").remove(); }
            openTab($(this));
            if ($('html').hasClass('no-boxshadow') && !$('html').hasClass('ie6')) { $(".shadow, .shadow-box").drop_shadow(); }
            return false;
        });

        $(".tabbed-box .tabbed-content").hide();
        $(".tabbed-box .tabbed-content").eq(0).show();
        $(".tabbed-box .tabs li a").eq(0).addClass("active");

    }

    Sealord.equalHeight($(".scroller h4"));

    $("#scroll-1").carouFredSel({
        width: 645,
        items: {
            height: "variable"
        },
        scroll: {
            items: 3
        },
        auto: false,
        circular: true,
        infinite: false,
        prev: "#scroll-1_prev",
        next: "#scroll-1_next"
    });



    // :hover for input tag
    $("input.button").hover(
      function () {
          $(this).addClass("hover");
      },
      function () {
          $(this).removeClass("hover");
      }
   );


    // RECIPE details RATE DIALOG
    if ($("#rate-link").length > 0) {

        var rateDial = { 'width': 150, 'height': 80, 'pos': ' ' };

        var rate = $('li.rate');
        rate.hover(function () {

            if (($(window).width() - ($('li.rate').offset().left - $(window).scrollLeft())) >= rateDial.width) { rateDial.pos = 'r'; } else { rateDial.pos = 'l'; }
            if (($(window).height() - (($('li.rate').offset().top - $(window).scrollTop()) + $('li.rate').outerHeight())) >= rateDial.height) { rateDial.pos += 'b'; } else { rateDial.pos += 't'; }

            $('.rate-dialog').removeClass('rt rb lt lb').addClass(rateDial.pos);
            $('li.rate').find('div.rate-dialog').stop(true, true).show();

        },
        function () {
            $('li.rate').find('div.rate-dialog').stop(true, true).delay(250).fadeOut('fast');
        });

        $('.rate-dialog .close-rating').click(function () {
            $('div.rate-dialog').stop(true, true).hide();
            return false;
        });
    }

    if ($("#recaptcha_image").length > 0) {
        $('#recaptcha_image').css("width", "245px");
    }

});   // eof document.ready()


$(window).load(function () {
	
    // encryption
    $.getScript("/static/scripts/xor.js", function(){
	    $('.safe_email').each(function() {
		    var d = xor.decrypt(this.rel, 'ruv5tgh');
		    this.href = d;
		    $(this).text(d.replace('mailto:', ''));
	    });   
    });

    // shadows for bad boys
    if ($('html').hasClass('no-boxshadow') && !$('html').hasClass('ie6')) {
        $(".shadow-box, .shadow").drop_shadow();
    }

    if ($(".scroll-heros").length > 0) {

        $(".scroll-heros .overlay").css({ opacity: 0.9 });

        $(".scroll-heros").carouFredSel({
            items: 1,
            scroll: {
                pauseOnHover: true
            },
            auto: {
                pauseDuration: 5000,
                delay: 3000,
                onAfter: function (oldItems, newItems) {
                    newItems.find("> div h2, > div a").fadeIn('slow');
                },
                onBefore: function (oldItems, newItems) {
                    oldItems.find("> div h2, > div a").hide();
                    newItems.find("> div h2, > div a").hide();
                }
            },
            pagination: {
                container: "#scroll_pag1",
                onAfter: function (oldItems, newItems) {
                    newItems.find("> div h2, > div a").fadeIn('slow');
                },
                onBefore: function (oldItems, newItems) {
                    oldItems.find("> div h2, > div a").hide();
                    newItems.find("> div h2, > div a").hide();
                }
            }
        }).find(".scroll-item:first h2,.scroll-item:first a").show();
    }
    
    $("select.styled").selectBox();
});


var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-22869125-1']);
 _gaq.push(['_trackPageview']);

(function () {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();






